Skip to main content
Known Participant
August 11, 2009
Answered

how to stop small animation

  • August 11, 2009
  • 1 reply
  • 800 views

     Hi

I guess I did not finish my project yet

Ok here is is

I have a script that will stop sound on click of the mouse, but I have a little animation running  but I need to stop it with the same click of the mouse ( together  with the sound)

just insert stop()  stop entire project and this is not good,  this is a loader and it need to have ability to continue even some one shut sound of.

I apprecate any help

Thanx

Lev

This topic has been closed for replies.
Correct answer kglad

is your "little animation" a movieclip?  if yes, assign it an instance name and apply a stop() to it.  if no, convert it to a movieclip, assign an instance name and apply a stop() to it.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
August 11, 2009

is your "little animation" a movieclip?  if yes, assign it an instance name and apply a stop() to it.  if no, convert it to a movieclip, assign an instance name and apply a stop() to it.

LevskyAuthor
Known Participant
August 11, 2009

Thanx

Why did i thougjt of this?

It work like a charm

Lev

kglad
Community Expert
Community Expert
August 12, 2009

Hi

IAhte to be a pest

I thought that u where correct and i know what to do, so I finaly got to the script and unless I am doins somthing worng iot do not working as expected

He is a script

mySound = new Sound();
mySound.attachSound("destination.mp3");
sound_btn.onRelease = function() {
mySound.stop();---------------------------------------------//--this stops the sound
}
anim_mc.onRelease = function() {
gotoAndStop("sound_anim"); --------------------------// this supouse to stop animation  in this way it do not  sound_anim is the name of the layer
}

///  I did try to go this way ----     anmi_mc.onRelease = stop()      //-   but this stop entire animation  

What did I did wrong?

Thanx

Lev


assign your animation movieclip an instance name, say animMC.  you can then use:

animMC.stop();   // to stop the animation

animMC.play();  // to continue the animation from where it was stopped.