• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Script to load movie at specific times

New Here ,
Nov 12, 2008 Nov 12, 2008

Copy link to clipboard

Copied

I've got a simple flash-based .exe that I'd like to load and play a move between a certain time of day. For example, the loaded movie should play everyday between noon-1pm and 2am-3am. The movie should then unload and go back to the original movie at the end of each time period. How and the world do I write the script for this?
TOPICS
ActionScript

Views

334

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 12, 2008 Nov 12, 2008

Copy link to clipboard

Copied

Try this script:

var d:Date = new Date();
trace(d.getHours());

You'll see that it gives 12 for times between noon and 1pm, and 2 for times between 2 and 3am. That should help. The first time it equates to 12 you start playing the movie, and as soon as it then equates to 13, you stop playing the movie.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 12, 2008 Nov 12, 2008

Copy link to clipboard

Copied

LATEST
Note: I want to say just notice that it depends on system time

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines