all groups > flash actionscript > june 2006 >
You're in the

flash actionscript

group:

Using cue points to trigger events on the main timeline...


Using cue points to trigger events on the main timeline... eabigelow
6/28/2006 11:45:02 PM
flash actionscript:
Hi--

I have successfully placed an flv (video) file (progressive download) on the
main timeline of my movie with controls to play and pause (Flash 8
Professional). So far, so good!

NOW TWO PROBLEMS: Does anyone know how to set it up so that when a specific
cue point is reached in the video, it triggers an action on the main timeline?
In this case, once the video is over, I want the main timeline to gotoAndPlay
frame 3. Specific script to do this would be great!

The other action I'd like to happen is that when the video begins, it targets
a scrolling text mc ("text") in the main timeline and tells it to gotoAndPlay
frame 2.

Any advice would be GREATLY appreciated!!! Many thanks!!!
Re: Using cue points to trigger events on the main timeline... myIP
6/29/2006 12:59:53 AM
I usually start off solving problems with the livedocs, as I recommend for
anyone. The following link will take you to the NetStream.onCuePoint handler.
This is what you need.


http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.ht
m?context=LiveDocs_Parts&file=00002561.html

You can have this code on the main timeline. When the cuepoint is hit, it
will invoke this event handler and inside is where your gotoAndPlay( ) should
go.

Your other question about the text will get activated by the same handler.
Just have a conditional statement (if, switch, etc.) to differentiate between
the two events. The text itself can be mask inside a movieclip.
Does this help?
Re: Using cue points to trigger events on the main timeline... eabigelow
6/29/2006 1:36:37 AM
Hi--

Thanks very much for your reply!

I have seen this livedoc before, and to tell the truth, I was not at all sure
on how to adapt the code for what I need to do. Is there a simple way to do
this?

My apologies for my ignorance, and many thanks for any addtional help you
might give me!
Re: Using cue points to trigger events on the main timeline... myIP
6/29/2006 1:57:31 AM
Goto the link below and Stiller has two links together about onCuePoints, I
would explain it more fully but I have to go.

http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=288&threadid=
1147657&highlight_key=y&keyword1=onCuePoint%20
AddThis Social Bookmark Button