0 Replies - 3765 Views - Last Post: 08 December 2013 - 02:49 PM

#1 CodeNubee  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 22
  • Joined: 28-March 13

stop() does not work as expected in AS2.0

Posted 08 December 2013 - 02:49 PM

I am using Adobe Flash CS6 and ActionScript 2.0.

I have a button that that is a bit complicated. Not only do I want it to pause the movie clip, I want it to pause all the movie clips that are inside that movie clip.

Everything is working perfectly except the last part. When the movie clip is on the last frame (everything has played), the animation continues ever AFTER I have pressed the "pause" button.

This is the code I have on my button:

I am using Adobe Flash CS6 and ActionScript 2.0.

I have a button that that is a bit complicated. Not only do I want it to pause the movie clip, I want it to pause all the movie clips that are inside that movie clip.

Everything is working perfectly except the last part. When the movie clip is on the last frame (everything has played), the animation continues ever AFTER I have pressed the "pause" button.

This is the code I have on my button:
on (release) {
    button_SpaceshipStop._visible    =    false;
    button_SpaceshipPlay._visible    =    true;
    mc_Spaceship.stop(); 

    if(this.mc_Spaceship._currentFrame != mc_Spaceship._totalFrames)
    {
        if( (this.mc_Spaceship.AnimatedShip_currentFrame >= 34 ) && 
           (this.mc_Spaceship.AnimatedShip_currentFrame <= 57) )
            {
            mc_Spaceship.RetractLegs.stop();
            }
        if( (this.mc_Spaceship.AnimatedShip_currentFrame >= 148 ) && 
           (this.mc_Spaceship.AnimatedShip_currentFrame <= 172) )
        {
            mc_Spaceship.ExtendLegs.stop();
        }
        if(this.mc_Spaceship.AnimatedShip_currentFrame >= 173)
        {
            mc_Spaceship.AnimatedShip.stop();
            mc_Spaceship.AnimatedShip.AlienAnim.stop();
            mc_Spaceship.AnimatedShip.AlienAnim.EyeLeft.stop();
            mc_Spaceship.AnimatedShip.AlienAnim.EyeRight.stop();
            mc_Spaceship.AnimatedShip.SpinningAntenna.stop();
            mc_Spaceship.AnimatedShip.SpinningBottom.stop();
            mc_Spaceship.AnimatedShip.SpinningHeadlights1.stop();
            mc_Spaceship.AnimatedShip.SpinningHeadlights2.stop();
            mc_Spaceship.AnimatedShip.SpinningHeadlights3.stop();
            mc_Spaceship.AnimatedShip.SpinningHeadlights4.stop();
            mc_Spaceship.AnimatedShip.SpinningHeadlights5.stop();
            mc_Spaceship.AnimatedShip.SpinningHeadlights6.stop();
        }
    }
    else
    {
            mc_Spaceship.AnimatedShip.stop();
            mc_Spaceship.AnimatedShip.AlienAnim.stop();
            mc_Spaceship.AnimatedShip.AlienAnim.EyeLeft.stop();
            mc_Spaceship.AnimatedShip.AlienAnim.EyeRight.stop();
            mc_Spaceship.AnimatedShip.SpinningAntenna.stop();
            mc_Spaceship.AnimatedShip.SpinningBottom.stop();
            mc_Spaceship.AnimatedShip.SpinningHeadlights1.stop();
            mc_Spaceship.AnimatedShip.SpinningHeadlights2.stop();
            mc_Spaceship.AnimatedShip.SpinningHeadlights3.stop();
            mc_Spaceship.AnimatedShip.SpinningHeadlights4.stop();
            mc_Spaceship.AnimatedShip.SpinningHeadlights5.stop();
            mc_Spaceship.AnimatedShip.SpinningHeadlights6.stop();
    }
}


Ideas?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1