Skip to main content
Participant
July 6, 2007
Question

Load by date

  • July 6, 2007
  • 5 replies
  • 269 views
Greetings!

Hoping I might get some help with a problem. I want to create a movie that will read the date (numeric day off server or user computer) and load an flv (or swf) into the movie. Any suggestions as to a starting point. The thing that is holding me up is the date detection.

Thanx in advance!
This topic has been closed for replies.

5 replies

Inspiring
July 6, 2007
You're welcome.

BTW:
you can ofcourse remove the:

// get day of month (1 to 31)
var the_day_of_month:Number = dt.getDate();

(demo purposes only)

ptvsavant wrote:
> Awesome!
>
> Thanks, that worked great!

--
----------
Manno Bult
http://www.aloft.nl
ptvsavantAuthor
Participant
July 6, 2007
Awesome!

Thanks, that worked great!
Inspiring
July 6, 2007

That'll work just as well. Somthing like:

var dt:Date = new Date();
// get day of month (1 to 31)
var the_day_of_month:Number = dt.getDate();
// day of week 0 to 6 in a heathen way ;)
var the_day_of_week:Number = dt.getDay();

var video_filename:String = "video" + the_day_of_month + ".swf";

placeholder_mc.loadMovie(video_filename);

Manno


ptvsavant wrote:
> This is great. Thank you!
>
> Unfortunately, I don't have the FLVplayback option (flash 7). I was going to use loadMovie in conjunction with it. Think that will work?

--
----------
Manno Bult
http://www.aloft.nl
ptvsavantAuthor
Participant
July 6, 2007
This is great. Thank you!

Unfortunately, I don't have the FLVplayback option (flash 7). I was going to use loadMovie in conjunction with it. Think that will work?
Inspiring
July 6, 2007
Hi,

the Date Class in the docs should give you a start when using the date
on the clientside. Just a few quick lines:

var dt:Date = new Date();
// get day of month (1 to 31)
var the_day_of_month:Number = dt.getDate();
// day of week 0 to 6 in a heathen way ;)
var the_day_of_week:Number = dt.getDay();

var video_filename:String = "video" + the_day_of_month + ".flv";

you can then feed it to the FLVplayback component or your own coded
NetStream.

Manno

ptvsavant wrote:
> Greetings!
>
> Hoping I might get some help with a problem. I want to create a movie that
> will read the date (numeric day off server or user computer) and load an flv
> (or swf) into the movie. Any suggestions as to a starting point. The thing that
> is holding me up is the date detection.
>
> Thanx in advance!
>

--
----------
Manno Bult
http://www.aloft.nl