A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: button prob

  1. #1
    Senior Member
    Join Date
    Oct 2002
    Location
    belgium
    Posts
    611

    button prob

    Hi people,

    How make this kind off buttons.

    Whenthe button is in norm.state it's grey.On rollover white.on rollout back to grey.But here's my prob on hit white.When hitting another button the previous button is back in it's normal state.

    Big thx in advance,

    Grtz

  2. #2
    FK's Giant Steve_w_V's Avatar
    Join Date
    Mar 2003
    Location
    San Jose, California
    Posts
    2,113
    You want the buttons to stay in the 'down' state?
    The other day, I bought a box of animal crackers. On the side, it said "Do Not Eat if Seal is Broken". I opened the box and sure enough...

  3. #3
    Senior Member
    Join Date
    Oct 2002
    Location
    belgium
    Posts
    611
    Hi Steve,

    Yeah on hit stay in the down state,on rollover perform an animation and on rollout.

    Now I did something like this:
    Made a button.
    Placed the button inside an mc.Frame1 is the normal state.onrollover it goes to frame2 stops at frame10 this is my rolloverstate.On frame2 and 10 on release go to frame11 so frame11 till 20 gives my rollout effect.
    the state have this code on the buttonsthis is for but0)
    on(release){
    _parent._parent.num=0;
    _parent._parent.buts(0);
    _parent._parent.showHide(0);

    }

    To get the down state I made a new mc.Frame1 has theprevious mc.frame2 the downstate.Both frames have a stop();

    these mc's(buttons) i gave names like but0,but1,...
    On frame1 off those mc's I placed this code to get the down state.
    function showHide(nm){
    if(nb!=nm){
    eval("but"+nm).gotoAndStop(2);
    eval("but"+nb).gotoAndPlay(1);
    nb = nm;
    }
    }

    To apply actions to the buttons I placed code on the down state>onclipevent perform blablabla...

    Pretty complex but it works maybe you know a better way because it took me a lot off time to get this working.

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