Flash Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsWeb DesignFlash Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 8th, 2013, 03:48 PM
justasiam justasiam is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2009
Posts: 11 justasiam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 38 sec
Reputation Power: 0
Stop() does not work as expected in AS2.0

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:
Code:
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?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignFlash Development > Stop() does not work as expected in AS2.0


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap