Time displays image

How can I get different images to display base on the time in Flash?\r\rThx.

Hey, live from my brand new laptop ! I hope that will make me a better flasher…\r\rAnyway, about your problem : the getTimer() should be your Ali Baba cave. Or was it Alladin ? Anyway, putting :

 time = getTimer () ;\r\rif (time/1000 > 5) gotoAndPlay (2) ;

that will make your movie play frame 2 after 2 seconds (or course you’ll have to put a stop action in the first frame…)\r\rpom 0]

Thanks for the actionscript!\r\rMy only problem is that the movie should open with the image greeting instead of a button release. How can I fix this problem?

??? I don’t understand what you mean. What’s released ? And what’s the image ?\r\rpom 0]

perhaps the Date object is your abu dhabi’s cave. ; )

I have fours images that represent "early morning, morning, afternoon and evening.\r\rEach time my flash movie is opened, I want one of the greetings to appear based on the time of day. \r\rI have tested and opened my movie but the images does not appear until I click on my home button (this is where my images will display). The actionscript does start with “on release”.\r\rI want to know if I can do something to trigger the movie to open at a particular frame on a given time.\r\rHope this makes sense!\r\rThx.

yup… the date object is what you want. If Supra doesn’t explain it by the time I get home I’ll try to post something.

Don’t you guys know Ali Baba ? And the 40 thieves ??? Great story.\r\rpom 0]

i know the story ilyslamasse, i was making fun. ; )\r\rlook in the help for date object. it’s a pretty thorough explanation.\r\rsomething like:

 \r\rmydate = new Date();\r\rtrace(mydate.getHour());


Its just not working for me!\r\rI thought trace action usually works with text display (output), how will this display my image(s)?\r\rI still have my “if functions” included, is this the problem?\r\rBut if the “if function” is not included then how will flash know when to display my image?\r\rBtw, thanks for the help…I have no knowledge of Flash.

sorry to be so vague, i put the trace action in there just you could see what the output was.\r\rnow that you know what it outputs, use it however you want.\r\rprobably something like\r\rimagemovie.gotoAndStop(hour);\r\rthen make imagemovie have the right image in the right frames.

I’m not getting it! This can take forever!\r\rIs it possible if I can get you to write the whole thing down?\r\rThis is what I want…\r\rif the hr is >=0 // <=4 then the “early” image displays,\relse\rif the hr is >=4 // <=12 then the “morning” image displays,\relse\rif the hr is >=12 // <=18 then the “noon” image displays,\relse\rif the hr is >=18 // <=24 then the “evening” image displays.\r\rI tried your method and this it what I have…\r\rmydate=newDate()\rtrace (mydate.getHour ());\rearly.gotostop(hour>=0 && <=4)\rand so with the morning, noon and evening.\r\rWhat is the problem?\r\rHope you’re not sick of me yet!

ok, rather than tracing the mydate.getHours(), maybe assign it to hour? that way, when you reference hour later, it’ll actually contain some information. ; )\r\rhow about you make a movie, call it image. put your early image in frames 1-4, your morning image in 5-12… etc.\r\rthen:

 \r\rmydate = new Date();\r\rhour = mydate.getHours();\r\r_root.image.gotoAndStop(hour);