Computer Science Canada Flash - how do you update the display? |
Author: | HazySmoke)345 [ 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? |
Author: | jeffgreco13 [ 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. |
Author: | HazySmoke)345 [ 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 |
Author: | jeffgreco13 [ Mon Dec 22, 2008 6:22 pm ] |
Post subject: | Re: Flash - how do you update the display? |
anytime |