A Flash Developer Resource Site

Results 1 to 18 of 18

Thread: setInterval- Should be easy

Threaded View

  1. #1
    </hate> dtone314's Avatar
    Join Date
    Jun 2005
    Location
    CA
    Posts
    262

    setInterval- Should be easy

    Hey all. So I'm making a website, all flash. I have a content window where my external .swf's are loaded into. I'm using kind of a verticle wiping look to transition between .swf's. I want my button to wipeout the current .swf (already set up) wait 2 seconds, then wipe in the .swf corresponding to the button I pressed. I'm a little confused on where to put the function, and exactly how to call it froma button.
    I have this on the first frame of my movie:
    code:
    funtion newswait() {
    loadMovie("news.swf",this.contents.holder);
    trace("GOGOGOGO");
    clearInterval(myTimer);
    }
    myTimer=setInterval(newswait,1500);


    ...and I have this on the button that I want to call the function:
    code:
    on(press) {
    //This wipes out the loaded .swf
    this.contents.holder.play();
    //I want a 2 second wait here, then execute the function.
    newswait();

    }



    What am I doing wrong? Thanks in advance!
    Last edited by dtone314; 10-19-2005 at 08:51 PM.
    -dtøne-
    Flash CS4 | AS2
    Life is a journey, not a destination.

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