Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying objects for a set period of time 2

Status
Not open for further replies.

Molenski

IS-IT--Management
Jan 24, 2002
288
DE
Hi there,

Was just wondering if anyone knows how to display objects on the stage for a period of time.

What I am doing is creating a Flash (MX) going away card for a work colleague to project on to the wall. I have done the intro and now want to display see-ya messages from other people for about 30secs a message.

The only way I know is to convert the text to a graphic and then work it out using the timeline so each graphic will show for a given period of time.

There must be a way of getting an object to display for a set period within a frame and then for the timeline to move to the next object on the next frame. Something like 'play for 30 and goto frame 2'.

Or am I being silly?

Thanks for your help on this oh wise ones!!!

Get Involved.

Molenski [bugeyed]
 
You could easily do it with the setInterval function in MX

On the first frame of your movie define this function:

stop();
function delay(){
play();
}

timer = setInterval(delay, 30000);
//where 30000 is 30 seconds or 60000, 1 minute.

The movie will stop for 30 seconds on each frame and then move on to the next frame.

If you ever want to stop this at one point, just use:

clearInterval(timer); Regards,

oldman3.gif
 
Thanks for this oldnewbie,

Is there any chance that I could ask for some more help?

I wonder now if I could use the same function to go to a frame after a given time, then play a set amount of frames, hold it on the last one, and then go to the next frame?

Or am I being really silly this time!?!?!?

Thanks for your help.

Molenski [cheers]
 
Thanks for the virtual beer!

Guess you could work something out, using 2 such functions, and clearing the first timer within the first function, then going to a certain frame, playing, and stopping where the second timer event would be called...

Does this make sense to you? Regards,

oldman3.gif
 
Hi again,

If I said it made sense but an example would be great would that make me not look too much like a thicko!!!

My experience in any sort of scripting is unfortunately very limited, and what with one thing and another, I just don't get the time......

I used the script you sent me, and created a movie clip that faded in on each frame of the main timeline although it would only work when I put -

stop();
function delay(){
play();
}

timer = setInterval(delay, 30000);

- on each individual frame.

Once again oldnewbie thanks for your help and this time have a couple!!! (I'd like to post you a virtual crate of beer, but unfortunately, there's no smiley available!!)

[cheers][cheers]

Regards.

Molenski
 
Can you send me your .fla?
Hit my handle for e-mail. Regards,

oldman3.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top