Hi There
I wish to make a ball go across the screen ( eventually it will be clouds )
I wish that the ball will reach the end of the screen anf then do the animation again.
This is the code I have written but the part that doesn't work is the part inside the else....
Thanks
Guy Lev
Israel AUGM
//setting the initial position of the ball
var xpos = -100;
// calling the symbol from library
var myball = sym.createChildSymbol("ball", "Stage");
//referencing the symbol
var myballsym = myball.getSymbolElement();
//setting the left posistion according tho the xpos var
myballsym.css({"position":"relative","left":xpos});
//checking the position of the ball
if ( xpos <=200 ) {
myballsym.animate({ "left": "400px" }, 2000);
}else {
var xpos = -100;
};