Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Symbol wont stop when I press my Pause Button

Guest
Jan 15, 2013 Jan 15, 2013

At the moment I have an animation, the animation is a bike with moving spokes that moves around, but when I press my pasue button the Bike stops but the spokes keep moving. The spokes and inside the bike as a Movie Clip. I am using Actionscript 3.

My code for the pasue button is:

play();

pauseButton_btn.addEventListener(MouseEvent.CLICK,stopNow);

function stopNow(e:MouseEvent){

stop();

}

TOPICS
ActionScript
564
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 15, 2013 Jan 15, 2013

you need to apply a stop() to your wheel movieclip that's inside your bike movieclip.  assign it an instance name (eg, wheel_mc) and use:

play();

pauseButton_btn.addEventListener(MouseEvent.CLICK,stopNow);

function stopNow(e:MouseEvent){

stop();

wheel_mc.stop(); // if you have two wheels, assign each a different instance name and assign a stop() to each.

}

Translate
Community Expert ,
Jan 15, 2013 Jan 15, 2013

you need to apply a stop() to your wheel movieclip that's inside your bike movieclip.  assign it an instance name (eg, wheel_mc) and use:

play();

pauseButton_btn.addEventListener(MouseEvent.CLICK,stopNow);

function stopNow(e:MouseEvent){

stop();

wheel_mc.stop(); // if you have two wheels, assign each a different instance name and assign a stop() to each.

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 15, 2013 Jan 15, 2013

is "wheel_mc" the instance name?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 15, 2013 Jan 15, 2013
LATEST

yes.

(but, you need to assign instance names.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines