Welcome to TalkGraphics.com
Results 1 to 4 of 4
  1. #1

    Default wait on frame, then go to another specific frame

    I got some code that works in a flash movie of mine.

    Code:
    loadMovie("banking.swf", banking_mc);
    this.stop();
    pause = function () {
            play();
            clearInterval(pausei);
    }
    pausei = setInterval(pause, 50000);
    I'm running the contents of during this pause. I have multiples of these. This way, I can simplify my timeline. But I tried to add a line after the pause time taht says goto frame 30, it just stops. Can somebody suggest the right syntax to go to a specific frame, or label after the pause interval?

    thanks for any help.
    IP

  2. #2

    Default Re: wait on frame, then go to another specific frame

    Well the way I solved this problem wasn't what I expected but oh well.

    I added a new frame after that, and in a new layer created a new frame script that was basically a gotoAndPlay(frame#);

    Pretty seamless. There simply isn't an Exit Frame script. Which to me seems really strange.
    IP

  3. #3
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,954

    Default Re: wait on frame, then go to another specific frame

    Glad you managed to solve it Michael as I'd no idea at all.
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host
    IP

  4. #4
    Join Date
    Nov 2006
    Location
    Hertfordshire
    Posts
    123

    Default Re: wait on frame, then go to another specific frame

    Ni Michaelbuddy

    Heres another way to do the same by executing a callback function, got it from the help files in flash,I just added the gotoAndStop(2) in the function, have a play with the maxCount numbers and Duration number to get the timings you want (duration is in milliseconds)

    Code:
    stop();
    var intervalId:number;
    var count:Number = 0;
    var maxCount:number = 5;
    var duration:number = 500;
    
    function executeCallback():Void{
    trace("executeCallback intervalId: " +intervalId+"count:"+count);
    if(count>=maxCount){
    gotoAndStop(2);
    clearInterval (intervalId);
    }
    count++;
    }
    intervalId = setInterval (this, "executeCallback",duration);
    IP

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •