Java Reference
In-Depth Information
public var enableReflection:Boolean = true;
public var fill:Paint = LinearGradient { ... }
def stack = Group{}
public function add (n:Node){
insert createCard(n) into stack.content
}
...
public function remove (idx:Integer){
def obj = stack.content[idx];
delete obj from stack.content;
}
public function shiftBackToFront ():Void {
def node = stack.content[0];
animate(node, 0);
}
public function shiftFrontToBack ():Void {
def node =
stack.content[(sizeof stack.content)-1];
animate(node, 1);
}
...
override function create (): Node {
...
stack
}
function createCard (node:Node):Group { ... }
function animate (node:Node, dir:Integer){
TranslateTransition {
...
action :function(){
if(dir == 0)
node.toFront()
else
node.toBack()
}
}.playFromStart();
}
}
 
Search WWH ::




Custom Search