Results 1 to 5 of 5

Thread: Flash Movie Quirk

  1. #1
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428

    Flash Movie Quirk

    This has me stumped. I've studied it and it has no consistent faults.

    I've got a small movie that flashes through 20 frames (timeline) and at certain frames I have a stop/pause action (stop, then pause for 3 seconds). You can see which frames. Anyway, depending on circumstance, the movie starts ignoring the 3 second pause. It mostly seems to attribute to doing something else in another window. That's the only time I've seen the issue.

    I just watched it for 3 minutes and nothing. I then refreshed the site and watched it for another 2 minutes. Nothing. Then I opened Flash and took the above screenshot of the timeline, and then pasted into Photoshop and all, saved it. Then looked at the site again and it was zipping right through the frames, no pauses.

    My mom said something about it. But nothing to lead me to know that she moved to other windows. She said she had the site up, talked to some people in her office, did some various office work and then looked back at her computer and the same thing, pauses being ignored. Again I don't know if she moved to any other winodws, but it's the only time I've noticed the fault.

    My AS (on each marked frame above in the timeline):


    Code:
    stop();
    var pauseDuration = 3000; 
    setInterval(this, "play", pauseDuration);
    Anyone know if this is just a freak thing, or what?
    Shawn Kerr .com

  2. #2
    Resident smart a$$
    Join Date
    Sep 2003
    Location
    UK
    Posts
    152
    I wouldn't have thought that setInterval call would work at all as its calling an internal function anyways try this:

    Code:
    stop();
    var intervalID;
    var pauseDuration = 3000;
    function playMovie() {
    	play();
    	clearInterval(intervalID);
    }
    intervalID = setInterval(playMovie, pauseDuration);

  3. #3
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428
    It works just fine, usually. I got that code from Colin Moock along time ago.

    You can see it working here: http://christumcmobile.com.

    It just has a quirk, that does or does not happen, sometimes. Heh. I just tried it now, and it ignored every other pause. *shrug* I'll try that code later and see if it makes any difference.
    Shawn Kerr .com

  4. #4
    Resident smart a$$
    Join Date
    Sep 2003
    Location
    UK
    Posts
    152
    Didn't know you could use the setInterval like that,

    In that case Id say it because your not clearing the Interval each time its called so from time to time the play command is called when your movie should be paused.

    try this

    Code:
    // frame 4
    stop();
    var pauseDuration = 3000;
    var intervalID;
    intervalID = setInterval(this, "play", pauseDuration);
    
    // frame 5
    clearInterval(intervalID);
    
    // frame 8
    intervalID = setInterval(this, "play", pauseDuration);
    
    etc.

  5. #5
    Roll Tide! mobilebadboy's Avatar
    Join Date
    Apr 2004
    Location
    Mobile, AL
    Posts
    428
    Well, it seems that's fixed it. Thanks.
    Shawn Kerr .com

Similar Threads

  1. Flash MX 2004 Action Script confusion!!
    By DTOXX in forum Graphics & Multimedia
    Replies: 23
    Last Post: 11-10-2004, 09:30 PM
  2. problem with flash mx 2004 code
    By power_1 in forum Graphics & Multimedia
    Replies: 1
    Last Post: 07-07-2004, 01:19 PM
  3. from flash to the web
    By waldoaustralia in forum Graphics & Multimedia
    Replies: 6
    Last Post: 06-23-2004, 10:48 PM
  4. Simple noob Flash Question
    By Jaffro in forum Graphics & Multimedia
    Replies: 1
    Last Post: 05-05-2004, 07:08 AM
  5. Flash MX 2004 Links
    By incka in forum Graphics & Multimedia
    Replies: 5
    Last Post: 01-27-2004, 11:31 AM

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
  •