2 buttons in 1 Movie Clip?

Posted on 2006-05-15
Last Modified: 2010-04-03


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?



Question by:tallmax
    LVL 4

    Accepted Solution

    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.

    Author Comment

    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:


    on (release) {
    gotoAndPlay ("MusicIsOFF")


    on (release) {;
    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?



    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Stock Videos 17 315
    Action Script commands 3 203
    How to convert pdf file to html file 8 362
    Accessing Live Dynamic Stream 6 170
    Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
    I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
    The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
    The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now