A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: appearing and dissapearing buttons

  1. #1
    Junior Member
    Join Date
    Jul 2002
    Posts
    3
    what i want to happen is after you click a button 30 times a different button will appear and the other one wont work. then if the new button is pressed it will dissapear and the other one will work fot 30 more clicks and so on...

    -SLUSHIE

  2. #2
    Senior Member
    Join Date
    Apr 2000
    Location
    Northern Ireland
    Posts
    2,146
    You need to make the 2 buttons, then make a new movieClip symbol which will act as a "switch" for the buttons. Put button 1 in frame 1 of the movieClip, and button 2 in frame 2 of the movieClip. Then you need to assign these actions:

    Code for button 1:
    Code:
    on (release) {
     if (count < 30) {
      count++;
     } else {
      gotoAndStop(2);
     }
    }
    Code on button 2:
    Code:
    on (release) {
      count = 0;
      gotoAndStop(1);
     }
    }
    Code on movieClip (put this code on the movieClip instance itself):
    Code:
    onClipEvent (load) {
     count = 0;
     stop()
    }

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