A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: button = inactive

  1. #1
    Flash rules all. steiner_99's Avatar
    Join Date
    Aug 2002
    Location
    Kitchener Canada
    Posts
    277

    button = inactive

    Does anyone know how to make a button turn inactive once you press it. Then turn active again when you press another button (beides it). like Flashinthecan
    (top navigation bar)

    I really like this technique and I want(*need) to implement it into my personal site Melodicmedia
    If anyone knows this script please teach! share.
    Last edited by steiner_99; 02-25-2004 at 08:35 PM.
    What you learn is meant to be forgotten, so you can flow freely.
    -Bruce Lee

  2. #2
    Flash rules all. steiner_99's Avatar
    Join Date
    Aug 2002
    Location
    Kitchener Canada
    Posts
    277
    c'mon anybody?
    What you learn is meant to be forgotten, so you can flow freely.
    -Bruce Lee

  3. #3
    Senior Member
    Join Date
    Mar 2002
    Posts
    249
    it is easy to do with movieclips as buttons.

    1) create a movieclip that has two frames, each with a STOP()

    2) in frame 1 put the 'button up' graphic and in frame 2 put the 'button down' graphic

    3) drag three instances of the movieclip onto the stage

    4) assign them Instance Names of button1, button2 and button3

    5) add the following code to the first button
    on (release) {
    _root.button1.gotoAndStop(2);
    _root.button2.gotoAndStop(1);
    _root.button3.gotoAndStop(1);
    }

    6) add the following code to the second button
    on (release) {
    _root.button1.gotoAndStop(1);
    _root.button2.gotoAndStop(2);
    _root.button3.gotoAndStop(1);
    }

    7) add the following code to the third button
    on (release) {
    _root.button1.gotoAndStop(1);
    _root.button2.gotoAndStop(1);
    _root.button3.gotoAndStop(2);
    }


    That's it! You can add buttons easily, change the up/down states, etc.

    here is sample code
    Attached Files Attached Files

  4. #4
    Flash rules all. steiner_99's Avatar
    Join Date
    Aug 2002
    Location
    Kitchener Canada
    Posts
    277
    cool thanks alot, that's very useful to me. Is there a way to do it with buttons already made?


    I got this code off of my classmate but never got it working properly.
    does this make any senes to you?
    I have 6 buttons:




    for(x=1; x<=6; x++){
    _root[x].enabled = true;
    }
    this.enabled = false
    What you learn is meant to be forgotten, so you can flow freely.
    -Bruce Lee

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