I can create a move clip, attach code to make the animation play within the movie click upon clicking the graphic with the mouse… but how would I stop it playing with the mouse clip once its playing…
Cheers :te:
I can create a move clip, attach code to make the animation play within the movie click upon clicking the graphic with the mouse… but how would I stop it playing with the mouse clip once its playing…
Cheers :te:
Do you mean stop the movie clip from playing once you move the mouse…I am not quite sure what you are looking to do?
But, if you are using a go to and play action or just a play action that is triggered with an on release, you could use that same action again with a stop instead.
Maybe try and re-explain what you are trying to do.
Thanks for the response… I have an image of a car that animates when clicked with the mouse. I would like it to stop animating when clicked again with the mouse.
Ive attached the file… click on it it starts moving… want to be able to click on it while moving to stop etc
Does it have to be the car that is clicked on or would you use buttons like a play and stop button?
yep it would ideally be the car… but a button would be a good enough solution…
cheers,
Clest
well it’s just that it is really easy with the use of pause/play buttons and I think it should be easy just using the mc itself as a button but it is stumping me for the moment.
I will attach an fla that uses buttons to do this for now though
here you are, sorry this is not exactly what you are looking for
Well… this isn’t a clicking solution… but it’s very very simple. Just put this code on your movieclip…
[color=red]on (keyPress “”) {
play();
}
on (keyPress “”) {
stop();
}[/color]
[color=black]Now in the “” assign a letter to it or any other key you would like. That’s one easy solution, but for clicking, I’m not sure right off the bat. I’ll maybe give it a go to see if I can come up with something. Hope this helps though.[/color]
thank you youve been very helpfull… If i just wanted to use just one button would i need to have an if statement?
Thanks very much for you’re help… if I only used the one button how would I go about that? I suppose it would need to toggle between pause n play?
cheers
I imagine if you were going to use a button to control it, you could create a static image… then place an invisible button over it (button with just a hit state) and then if you press it, maybe it would trigger the invisible button to go off the stage and replace it with another invisible button that would have code to start it back up again? And then you’d do the same for the button you used to replace the stop button? I haven’t tried it yet, but sounds like a good idea.
For button:
stopgo=0;
on (release){
if (stopgo==0){
movieclip.play();
stopgo=1;
}else{
movieclip.stop();
stopgo=0;
}
}
:: Copyright KIRUPA 2024 //--