We have reduced support for legacy browsers.

What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.

What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.

Flash animation problem

Hello guys I have flash animation problem
it is here:
[http://youtu.be/v01GLZ4pZFg](http://youtu.be/v01GLZ4pZFg)
Maybe this video is preparin now but then you can solving my problem
please help me!this project is very important for me

I don’t see why would it be bad to use timeline code, if it is not a big project.
And to solve your problem, i couldn’t read your code but maybe you have a stop() statement at the end of your object, and maybe your animation is playing in the background and when you addChild it is at the last frame, try adding stop(); in the first frame of your object, and exactly after you add it to stage use yourObjectName.play();

> *Originally posted by **[AMD\_Paulius\_J](/forums/4/topics/325654?page=1#posts-6845246):***
>
> I don’t see why would it be bad to use timeline code, if it is not a big project.
[Some people seem to think otherwise](http://www.kongregate.com/forums/4-game-programming/topics/324307-coding-on-timeline)

> *Originally posted by **[Draco18s](/forums/4/topics/325654?page=1#posts-6845827):***
> > *Originally posted by **[AMD\_Paulius\_J](/forums/4/topics/325654?page=1#posts-6845246):***
> >
> > I don’t see why would it be bad to use timeline code, if it is not a big project.
>
> [Some people seem to think otherwise](http://www.kongregate.com/forums/4-game-programming/topics/324307-coding-on-timeline)
Yes I read that thread, but didn’t participate because my opinion differs from majority. If it is a small project I believe that procedural programming is the way to go, especially when one is learning things.
But yeah, that’s only a personal opinion, it may be wrong.

Will the thread be derailed into another Timeline vs no timeline thread?
It’s like the new “AS2 vs AS3”.
But I can’t really see what’s happening in the video. It’d be better if you just post an explanation.

you’re probably much better off using code to control your animations. I used to do nested movieclips in my animations, but i stumbled upon something better. It was also coded on a timeline so i had to make some mods.
This may help you out with some ideas. But if youre gonna use this make sure your animations of your hero are on one movieclip.
function runFrames(frameStart:Number, frameEnd:Number):void {
//THIS WILL RUN THE FRAMES FROM TO AND LOOP BACK TO THE BEGINNING
this.currentFrame=cFrame;
if(this.currentFrame \< frameStart || this.currentFrame \>= frameEnd)
{this.gotoAndStop(frameStart);}
else {
this.nextFrame();
trace(this.action);
trace(this.currentFrame);
}//if (this.currentFrame….
}//function runFrames
function runAttackFrames(frameStart:Number,frameEnd:Number):void {
this.currentFrame=cFrame;
//THIS SHOULD FIRST TRIGGER THE cFrame LABEL AND THEN RUN THE FRAME SEQUENCE
//HITTING THE cFrame FIRST SHOULD GUARANTEE THE FRAME SEQUENCE WILL RUN IMMEDIATELY AFTER.
if(this.currentFrame == frameEnd){
this.isAttacking = false;
if(!(this.attackSuccess=true)){
trace(“Attack WHIFFED!!”);
}else{
this.resetAttackSuccess();
}//if(!(this.attackSuccess=true))
}//if (this.currentFrame == frameEnd)
if(this.currentFrame \< frameStart || this.currentFrame \>= frameEnd){
this.gotoAndStop(frameStart);
}else{
this.isAttacking=true;
this.nextFrame();
}
}//function runAttackFrames
public function attackFrameCheck():void {
/\*this function checks the currentframe of the hero movieclip and if it
hits a certain framedo something
switch (this.currentFrame) {
case 116:
break;
}}
``

I think timeline code is perfectly fine for this particular case. Just as AS2 and Adobe’s Flash CS, timeline code is good for animators who don’t want to bother learning how to code.
@OP: What Draco said on his first reply. That video won’t help us figure out what’s your problem.