-
1. Re: Move a symbol with script
resdesign Jul 3, 2013 9:46 AM (in response to Benoit Leray)1 person found this helpfulIf you want the easy way out, here is a pluggin you can use:
http://visionmedia.github.io/move.js/
otherwise I will try to get you the code sometime today.
-
2. Re: Move a symbol with script
resdesign Jul 3, 2013 10:11 AM (in response to resdesign)1 person found this helpfulHere is the code:
setInterval(function() {
sym.$('Rectangle').animate({
left: "+=30px",
}, 20 );
}, 2000);
-
3. Re: Move a symbol with script
Benoit Leray Jul 4, 2013 2:18 AM (in response to resdesign)Thanks a lot.
do I'm suppose to put this line of code in the code panel at a stage level, or to the symbol level ? Currently it don't work in any of them.
-
4. Re: Move a symbol with script
resdesign Jul 4, 2013 5:38 AM (in response to Benoit Leray)1 person found this helpfulI would put it in Stage/composition ready. What do you have exactly? Several symbols on the stage or one symbol with symbols inside. It all depends on th scope of your element.
-
5. Re: Move a symbol with script
Benoit Leray Jul 4, 2013 6:00 AM (in response to resdesign)I'm sorry, I don't understand the "ready" concept
It's really basic.
It's just a header for a webpage with a symbol - with a animated gif inside - moving from left to right slowly.
-
-
7. Re: Move a symbol with script
Benoit Leray Jul 5, 2013 12:26 AM (in response to resdesign)So many thanks resdesign for your help, it works perfectly !
Following this code, I need to loop the animation process at a certain time, or when my symbol reach a specific x position (980px in these case - arround 2,5 sec) Is it better to put a trigger in the timeline or this is something I can do straight into the code ?
-
8. Re: Move a symbol with script
resdesign Jul 5, 2013 10:56 AM (in response to Benoit Leray)You can find the position with getPosition() and use an if state my to stop it.
-
9. Re: Move a symbol with script
resdesign Jul 5, 2013 10:59 AM (in response to Benoit Leray)I meant if statement - answering from an iPhone can be funny sometimes!