View Full Version : telling movieclips to stop
zachisevil
02-16-2006, 10:47 PM
hey i was wondering how i would tell a movie clip to stop using a button. I just dont know how to tell the button to stop that specific movieclip, i know its simple but im an uber flash noob.
eggnogg
02-16-2006, 11:04 PM
btn.onPress = function () {
mc.stop();
}
can't get any more simple than that...i had to check if it really worked...thats for how long i havent stopped a movie witha button hehe
zachisevil
02-16-2006, 11:09 PM
would you put that in a layer?
i fixed it i just went through a built in flash tutorial. i put
on(press) {
mymovieclip.stop()
}
in the button i wanted it to do it with.
eggnogg
02-16-2006, 11:14 PM
yeah, put the script in the layer. in the same timeline as the movie
start using codes on layers, instead of puting them on buttons...later you wich to delete the button and puf there goes the code...
name the button instance someName and put the code in the layer:
someName.onPress = function() {
//transform the world with actionscript
}
cheers
zachisevil
02-16-2006, 11:26 PM
STOPBTN.onPress = function() {
QUALMOV.stop();
};
this didnt work
eggnogg
02-17-2006, 01:02 AM
you gotta put the code in the timeline (and frame) where the mc is..also name your mc instance and your btn instance. it should work fine.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.