PDA

Click to See Complete Forum and Search --> : Making time line play movie clips…


benjo
06-16-2005, 07:13 PM
Using Flash MX 2004 how do I make the time line play movie clips that are embedded movie clips before progressing into the next frame/scene.

In other words If I place a movie clip and it’s only on three frames how do I make shore my play head pauses till the movie clip is finished playing before going into the next frame or scene?

Patrick Shannon
06-16-2005, 07:22 PM
I was going to suggest putting that embedded movie into a library movie with a _root.element.gotoAndPlay(?); command, but I don't think you can use library movies to control the main time line (as opposed to other movies), can you?

When you drop your embedded movie into the time line, I think Flash should ask if you want to increase the amount of frames to the length of the movie. If this works and you drag and drop into the main timeline, you could then just issue your next command on the final frame.

uncle carbunkle
06-16-2005, 07:26 PM
does it have to be embedded?

without opening flash, (sorry - no actionscript for you! only logic), can't you just go to the embedded clip & play. then, on the last frame of the clip, go back to the appropriate frame in your scene?

does that make sense, or do i have to open flash? don't make me open flash, man.

benjo
06-16-2005, 08:06 PM
No it’s basically a movie clip dropped onto the main time line and I need the playhead to wait for the animation to finish before going into the next scene or my animation is cut short.

And yes I have to use movie clips cause making all these animations on the main time line can get really ugly.

Ulysses
06-17-2005, 12:36 AM
I'd just put the animations into seperate MCs (so they run on their own timeline), and place script on the last frame of each of those MCs, to point your main timeline wherever you need it to go (frame-wise). This also allows you to work with a much smaller and friendler timeline on which to build your menus and interactive elemetents, by keeping lengthy animations to fewer and/or single frames on the main timeline.

You do know that because MCs run on seperate timelines, that the MCs don't need to be the same length on the main timeline, or even when placed within other MCs?! So for example, you could have a 400 frame animation MC, but just place the MC itself on one frame of the main timeline, and the animation will play all 400 frames (unless you control the MC via script, which is where all the fun starts).

If I understand you correctly Benjo, this (http://www.poppymedia.co.uk/downloads/frame_sample.fla) will do exactly as you're asking

Simple. Easy. Quick.

benjo
06-17-2005, 12:38 PM
Ulysses that is excellent my question how do I apply it to my design.
It says:
_root.gotoAndStop(2);
stop();

So the number 2 between the () refers to the root timeline(main timeline) and I should just be able to change this value to the fame I want the pause to be applied to correct?

benjo
06-17-2005, 12:41 PM
Nope not working… Ulysses and advice for this one?

Ulysses
06-17-2005, 06:22 PM
Yes, _root is an absolute reference to the main timeline, and telling it to go to frame 2, makes it move to frame 2. So yes, changing the value '2' to another frame number will do exactly that.

Can you upload your .fla for me to look at, Benjo? Otherwise just PM it to me. Or ... try and explain your scenario a little more.

Ulysses
06-17-2005, 06:23 PM
So:

_root.gotoAndStop(2); = tell main timeline to go to frame 2
stop(); = tell this MC frame to stop here, to prevent looping.

idaho
06-17-2005, 08:17 PM
Go here and subscribe to the Flashnewbie list.

http://new.figleaf.com/community/listserv.cfm

These folks will be able to help you figure out your problem very quickly.

Good luck.