A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [F8] MC Btn needs to stay _down...

Hybrid View

  1. #1
    Junior Member
    Join Date
    May 2005
    Posts
    7

    [F8] MC Btn needs to stay _down...

    Hi guys i am searching for the actionscript to get my mc btn to stay down.

    could you guys help me out?

    This is the code on my 1st frame in my btn:

    stop();

    onRelease = function(){
    }


    I just don't know how to script the function for it to stay down when clicked.

    Thx for the help!
    bboy

  2. #2
    Senior Member
    Join Date
    Nov 2005
    Location
    dante's inferno
    Posts
    904
    myButton_btn.onRelease = function(){
    myButton_btn.enabled = false;
    this.gotoAndStop(_down);
    }




    IMS

  3. #3
    Junior Member
    Join Date
    May 2005
    Posts
    7
    alright thats what i needed! enabled = false!!!

    damn i didn't stay on _down ... thanks for the insight!
    bboy

  4. #4
    Senior Member
    Join Date
    Nov 2005
    Location
    dante's inferno
    Posts
    904
    depending on how your button is setup:
    i use a movieclip, I make a layer called labels, in this I make three labels _up, _over, and _down. the labels are over each corsponding state of my "button".

    then when you use:
    myButton.onRelease = function() the movie clip will act like a button.

    So unless you have a label named "_down" in your button, the code above will not work.



    IMS

  5. #5
    Junior Member
    Join Date
    May 2005
    Posts
    7
    yeah thats good, that's how I did it... it was all working except for the stop on _down! major problem but like I said the "myButton_btn.enabled = false;" script wasn't there so it was returning to the original state....
    bboy

  6. #6
    Senior Member
    Join Date
    Nov 2005
    Location
    dante's inferno
    Posts
    904
    forgot the quotes:

    this.gotoAndStop('_down');


    IMS

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