Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Flash - how do you update the display?
Index -> Graphics and Design, Web Design -> Flash MX Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
HazySmoke)345




PostPosted: 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
Sponsor
sponsor
jeffgreco13




PostPosted: 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




PostPosted: 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




PostPosted: Mon Dec 22, 2008 6:22 pm   Post subject: Re: Flash - how do you update the display?

anytime
Display posts from previous:   
   Index -> Graphics and Design, Web Design -> Flash MX Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: