Problem with a Flash movie for my website

  jayne_uk 14:06 06 Apr 2004

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 2004

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 2004

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.

Elsewhere on IDG sites

AMD Radeon Adrenalin release date, new features, compatible graphics cards

8 brilliant character artists speaking at Pictoplasma 2018

iMac Pro release date, UK price & specs

Football : comment regarder la Ligue 1 en direct ?