• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 144
  • Last Modified:

2 buttons in 1 Movie Clip?

http://www.tallpinedesign.com/clients/creativeposse/v2/index.html

Hi,

This seems like it's too easy but its stumping me. I want to create a button that displays text reading "Turn Music Off" until the user clicks on it, at which time a new button would show ""Turn Music On" in the same spot. --Forget about the code to make the music go on and off, it's the  change in text I want to accomplish.

So far I've created a movie clip with two buttons in it, Frames 1-10 show the "Turn Off" button, 11-20 show the "Turn On" button. --Unfortunately I find the button movie clip looping through over and over effectively animating "Turn On, Turn Off, Turn On, Turn Off", etc., etc.

I labeled frame 1 and put a "stop" action on an action layer so the button would (theoretically) stop after running through 10 frames but the "stop" doesn't seem to stop anything. Where've I gone wrong?

Thanks,

Max

0
tallmax
Asked:
tallmax
1 Solution
 
GuicCommented:
Hi,
Which is the name of your movieclip ?
Make 2 labels in this moveiclip, with 2 keys and a stop() on each.


I think your stop doen't work because you don't stop the right movieclip. And the gotoAndStop is the same.
Regards
0
 
tallmaxAuthor Commented:
Hi Guic,


Thanks for the help! Sorry for the delay in response, I'm on EST. Here are more details:

---------

The movieclip is called "musicbuttons" it is 20 frames long.

There are 3 layers in the movieclip: "buttons, "labels" & "actions".

The buttons are on the button layer and named: "MusicIsOFF" and "MusicIsON"

There are two labels on the label layer on keyframes 1& 11 called: "MusicIsON" and "MusicIsOFF".

The action layer has two actions, one at keyframe 1 and another at keyframe 11: each action is a simple "stop".

---------

The buttons have actions:

MusicIsON:

on (release) {
stopAllsounds();
_root.music.stop();
gotoAndPlay ("MusicIsOFF")
}


MusicIsOFF:

on (release) {
_root.music.gotoAndPlay(1);
}
on (release) {
gotoAndPlay ("MusicIsON")
}

---------

As I said, I expected the movie clip to "stop" at the stops and have tried a variety of stops to get it to cease looping, but to no avail?

Thanks,

Max
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now