Groups | Blog | Home
all groups > flash actionscript > january 2005 >

flash actionscript : animation from AS


tralfaz
1/2/2005 10:54:23 AM
The entire actionscript loop will execute in that one frame before it
moves to the next frame. Even if it did update the character's
position that fast, it would be too fast to see it. What you want to
do is only change the character's position once per frame.

onEnterFrame = function()
{
thing._x += 5;
if(thing._x > Stage.width)
thing._x =0;
}
tralfaz


[quoted text, click to view]

d3ntaku
1/2/2005 6:24:59 PM
hiya -

simple question: I want to create an animation from actionscript, for example
moving an item across the screen. however, all that seems to happen is the item
jumps to the end of the anim.

Is there somehting like a "refreshScreen" function to paint in the middle of
an AS loop? Or do i have to have different "increment" values and split the
script across two frames.

For what its worth, i am doing this for FlashLite (for a mobile device) so -
Flash4 techniques are what im ideally looking for!
AddThis Social Bookmark Button