Animating a Symbol on Stage using a JS function


lets animate samplesymbol right, following code placed in click trigger button, understanding best way animate stuff write js functions in action panels, it?

 

 

the following line fails animate samplesymbol placed on stage...

 

movetoright();

 

function movetoright() {

sym.$("samplesymbol").style.left = (sym.$("samplesymbol").style.left+1)+'px';

// code supposed move object 1px right

 

settimeout(movetoright,20); // call function() in 20 msec

}

hi, departure-

 

actually, i'd best practice animate on timeline , reserve code calling animations.  animate using code when there's absolutely no other way want.  code, of syntax incorrect, instead of doing things way, use jquery's method of animating:

 

sym.$("samplesymbol").animate({left: '+=20px'}, 20);

 

http://api.jquery.com/animate/

 

-elaine



More discussions in Edge Animate CC


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account