Problem with a Flash movie for my website

  jayne_uk 14:06 06 Apr 04

I have created a flash movie for my website and I want the movie to play once every 1/2 minutes. I know that I have to use actionScript to accomplish this and think that using setInterval might be the answer, however I cannot get it to work. I also don't know whether to put the script at frame 1 of my movie, or the last frame of the movie - please help.

this is my code so far:
timer = setInterval(delay,60000);
function delay(){

  Taran 09:04 07 Apr 04

Fundamentally there seems to be nothing wrong with your code.

The code to repeat your movie is best placed on the first frame.

Open your movie file in Flash.

Select the first frame on the timeline.

Open the actionscript view.

Write your code.

Run the movie to test it and see what happens.

It's always difficult to know why programming doesn't work. There are so many possible reasons and there could well be aspects of your movie, depending on any other code or actions used, that is causing the trip up.

One possible workaround that I caught one of my staff using once is to add extra empty movie frames at the end of the movie and then set it to loop. In effect, you lengthen your movie and just 'freeze' the last moving frame and when the movie reaches the end of these dummy padding frames it loops and repeats as normal. Obviously this is not a desirable method of running your movie. Unless it is very short and will not be unduly affected by adding in a long pause at the end...

See how you get along, but the code seems sound and should go on the first frmae of the movie, not the last.

  Taran 10:35 07 Apr 04

I should have really pointed out that your movie frame rate will upset the setInterval method of controlling replay.

Different frame rates will alter the end output quite radically, so don't necessarily expect a guaranteed 60 second replay since your framerate can throw this right out of sync.

This thread is now locked and can not be replied to.

How to watch Surface PC live stream | Surface PC release date, price, spec rumours: All-in-one…

1995-2015: How technology has changed the world in 20 years

Best Photoshop video tutorials: 8 video tutorial websites for Photoshop

Apple's event invitations decoded: A look back at 16 of Apple's most cryptic invites | Clues in…