A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Controlling MC's over time

  1. #1
    Member
    Join Date
    Dec 2001
    Posts
    34

    Controlling MC's over time

    Hi,


    I'm trying to load 7 different movies into a container movie clip. The container movie has the load movie command on 7 seperate frames (each frame calling in its respective clip). How do i go about getting the movie to randomly go to each of these frames whith a delay of about 5mins before it moves onto the next frame.

    I'm sure it's something simple and any haelp would be greatly appreciated.

    Thanks,
    Barrie

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Posts
    298
    Here is one way to do it:
    first put a stop on each key frame
    Code:
    stop();
    Then on the first frame setup a function that will play when called and an interval command.
    Code:
    function delayPlay () {
    	play();
    }
    playInterval = setInterval(delayPlay,300000);
    now here is what this does. the function when called will tell the MC to play. The playInterval sets up a timer that will call the function every x 1000/of a sec.(x being the 300000 in this example which should equal 5 minutes).

    in the last frame that you want to access you add this
    Code:
    clearInterval(playInterval);
    This clears the interval which will stop calling the function and the process will stop. If you want to repeat the process forever just leave this command out.

    I hope this helps
    ----------------------------
    Felix_Man
    "Shop smart... Shop S-MART"

  3. #3
    Member
    Join Date
    Dec 2001
    Posts
    34
    Many thanks Mr Man.
    That seems to work like a charm. I appreciate you taking time out to explain things. I can enjoy my cup of tea in peace now.

    Cheers,
    Barrie

  4. #4
    Senior Member
    Join Date
    Sep 2000
    Posts
    298
    No problem... btw: You can call me Felix.
    ----------------------------
    Felix_Man
    "Shop smart... Shop S-MART"

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