Playing a Flash movie every hour.

Posted on 2009-02-08
Last Modified: 2013-11-12
Hi, does anyone know of an ActionScript to start playing a movie every hour on the hour?  I am using Flash CS3 and AS3. Totally new at this.

Yesterday someone gave me a script on how to delay the movie my 90 seconds but customer now wants every hour.

I appreciate it. Thanks.
Question by:ecperi58
    LVL 19

    Expert Comment

    If the 90 secs movie worked, what's wrong with multiplying the delay by 40 to get 1 time per hour (simple maths 0 - are you ok with the maths ?)

    Author Comment

    Sorry - don't get it. Does this mean that it would play every hour? So if someone signs in at 2:20PM it will play at 3 and if someone signs in at 8:05 am, it would play ant 9am?
    LVL 9

    Accepted Solution

    Seeing as the last script worked for you, I updated it for this scenario.

    When you say:

    new Timer(3600000);

    ...then the number is the amount of milliseconds to wait. Before then there was a second parameter:

    new Timer(30000, 1);

    ...and that means that it runs once. If you leave that number out, or make it 0, then it will keep repeating forever.

    Hope that helps!
    var StartTimer:Timer = new Timer(3600000);
    StartTimer.addEventListener(TimerEvent.TIMER, startMovie);
    function startMovie(event:TimerEvent):void

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
    While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
    The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
    The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now