![]() |
Make a Dynamic Tween
Hi Guys,
I've been playing around with this for a few days now but cant figure it out. Basically i have a Graphic that i am moving from point A to point B. Point b will always be the position 0,0 however point A will change dynamically depending on the positions passed through to it. i can successfully pass the positions through to the Frame with the tween but i cant get it to work. I have tried converting the graphic to a Movie Clip in frame one of the tween and the same on the last frame, i have given them 2 separate names, say Graphic1 and Graphic2. The i have tried setting their positions as follows: Code:
Graphic1._x = xposition;Has anyone ideas? |
Nevermind,
I just figured out that flash cannot handle Clip Events with mixed in AS at the same time, it will prioritize AS over the Clip. The solution was to write the tween in AS, is looks something like this: Code:
Graphic1._x = xposition;It would have a problem if the x position origianal passed was not an exact divisional of 10, it would go slightly off screen, to fix that, i have changed the if(i>0){ line to if(i>10){. The after that has run i tell it to position it to 0. Thanks, pspsully |
Or use the Tween Class.
|
| All times are GMT +1. The time now is 07:17 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.