Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorphilips
    • CommentTimeNov 26th 2006
     
    Is it possible to have a Flash clip running from 8am-6pm and then different one from 6pm-8am? I do not need this be online so it doesnt have to be done in HTML but it would be preferable.

    Thanks!
    • CommentAuthorhardy
    • CommentTimeNov 26th 2006
     
    Well to answer your question you can do it either way. Flash, Javascript and I'm sure PHP/ASP/Etc can all tell time. In flash I would make one container clip that always exits and have it load a different clip at the correct times.

    The basic concept is like this:

    time = new Date();
    // time object
    var hours = time.getHours(); // returns a number between  0 and 23
    this.createEmptyMovieClip("loadContainer", this.getNextHighestDepth());
    if(hours > 9 && hours < 14){
       loadMovie("cliptoload.swf",loadContainer);
    }else{
       loadMovie("othercliptoload.swf",loadContainer);
    }

    // if hour falls between 9 and 14 load movie A
    // if hour is anything outside that range load movie B

    You can refine all that to find out how many minutes away something is, etc but thats the basic premise