dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: buton press once to load press again to unload

  1. #1
    ho w do you create buton witch you press once to load a .swf file then ptess again to unload that same .swf file


    eg: running movi1.swf on click1 load movi2.swf levle 2 on click2 unload movi2.swf





  2. #2
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    Hi...

    Try this...use a variable toggle to check whether the button has been clicked or not, then take the appropriatre action based on the result...

    Code:
    on(release){
    if(clicked == 1){
    unloadMovie(_level1);
    clicked=0;
    }
    else{
    loadMovie("which.swf", 1);
    clicked=1;
    }
    }
    Hope this helps,

    K.

  3. #3
    Thanks alot it works.

    If anyone else has another way of doing this begreat to see the more info the better.

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