[CS3] AS3 Rending issue which is annoying me greatly
As much as I like AS3, there are a lot of little things which make Willoughby go mad (and refer to himself in the third person).
In AS2, I had a custom class that controlled the playhead, allowing me to play movie clips forward, backwards, skip frames, play to a certain frame, or whatever.
I recreated this code in AS3, but if there are any movie clips animating inside of the movie being manipulated, they do not animate at all.
I have created a little demonstration to show you what I mean. All the code does is move the playhead forward, and when it reaches the final frame, moves the playhead backwards.
http://www.willoughbyweb.com/as3haet.html
As you see in the AS3 one, Chunners doesn’t animate at all.
Has anyone else run into this, or am I the only one who does this sort of thing?
1 Attachment(s)
this piece of code might work for u . its simple and very short .
// here u can control the animation in single frame .. hope this one will // // help u out .. happy coding :)
var dir:Number = 8
addEventListener(Event.ENTER_FRAME, animate)
function animate (evt:Event) {
chunners.x += dir;
if ( chunners.x >= stage.stageWidth)
{
dir = -dir;
} else if ( chunners.x <=0)
{
dir = -dir;
}
}