A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Buttons and making them invisible

  1. #1
    Sleepy
    Join Date
    Apr 2001
    Location
    Tallahassee, FL
    Posts
    498
    here's one that is stumping me right now... I have two buttons overlaying eachother. I only need one visible at a time, and would like to hide the other
    i.e. Play/Stop button.

    how can I hide one of the two buttons?

    Thanks bros and bro-ettes

  2. #2
    Member
    Join Date
    May 2001
    Posts
    42

    well...the long way about...

    If I were doing this, I'd make a movie clip called "TheButton" that have 2 frames "play" and "stop" (as well as the button images, respectively). In these 2 frames, I'd have a variable "a" that would equal 1 if it is playing, or 0 if it isn't. So "play" would have a = 1, and "stop" would have a = 0.
    I'd place an invisible button over this movie clip and its action would be:
    on(release) {
    if (a == 1) {
    TheButton.gotoAndStop("stop");
    }
    if (a == 0) {
    TheButton.gotoAndStop("play");
    }
    }
    Hope this helps.

  3. #3
    Sleepy
    Join Date
    Apr 2001
    Location
    Tallahassee, FL
    Posts
    498
    isn't it amazing....


    Doesn't it seem like shortly after you post something you figure it out? That was my case here. About fifteen minutes after I posted (and a pint of guiness later) I came to the same conclusion of sticking it in a MC.

    For whatever reason I thought that a button object had a _visible property... I was wrong


    Thanks for the heads up though, I appreciate it..

  4. #4
    Junior Member
    Join Date
    Jun 2004
    Location
    Arkansas
    Posts
    1

    Invisible Button

    Hey small_alo; about that invisible button that you placed over the Movie Clips; how did you make it invisible?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center