Flash - how do you update the display?
Author |
Message |
HazySmoke)345
|
Posted: Fri Dec 19, 2008 11:01 am Post subject: Flash - how do you update the display? |
|
|
I'm trying to create an animation where a box moves from one point to another.
Instead using motion tweens, I'm trying to use write a method in ActionScript that continuously changes the x and y coordinates of the box until it gets to the spot.
Here's the problem. Instead of seeing a smooth animation, the flash animation lags until the box is at its final position. The display is not being updated in between.
I thought updateAfterEvent() would do the trick, but it doesn't. It's not being called within onClipEvent.
Is there a way around it? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
jeffgreco13
|
Posted: Sat Dec 20, 2008 8:36 am Post subject: Re: Flash - how do you update the display? |
|
|
You can actually create a motiontween ENTIRELY in actionscript.
I'm guessing you want to do something dynamic with the X and Y values (have it start/end depending on other values, etc.)
Have a look here
That site is a great tutorial for creating tweens of flash objects without having multiple keyframes.
You're trying to do the animation much too brutally (Turing style) when there's actually a much better alternative. |
|
|
|
|
|
HazySmoke)345
|
Posted: Sun Dec 21, 2008 11:53 am Post subject: Re: Flash - how do you update the display? |
|
|
WOW! That's exactly what I needed. I never knew you could do this. Thank you so much! +15 bits |
|
|
|
|
|
jeffgreco13
|
Posted: Mon Dec 22, 2008 6:22 pm Post subject: Re: Flash - how do you update the display? |
|
|
anytime |
|
|
|
|
|
|
|