I have a .flv file (and also the original .mov from which the .flv was created) that i have imported into a new .fla - I also have created a button and assigned actionscript to the button that links to a new web page. The button works correctly. My issue is that I need the button to show up at 6mins42seconds into the video, and I don't know how to write the script to make it do so. I could do this easily if the video showed up frame-by-frame in my timeline, but since it's an external .flv and is only coming in as one keyframe I'm stuck. From reviewing the archives, I think I may need to use cue points? I have already re-encoded the .flv with a cue point added at the right place. The encoder also asked for 'name' and 'value' parameters for the cue point, which i wasn't sure what it wanted so just entered 'button' for both as a placeholder. Help is most appreciated, thanks.


Recommended Answers

All 3 Replies

The button links to a website perfectly, just need to know how to code it to move onto stage exactly at 6min.42secs. OR if anything do you know how to drag out the .mov or .flv from 1 key frame into many(seems would be easier that way)

Member Avatar for rajarajan2017

Use timer function in AS3.0 or setInterval in AS2.0 to initiate a timer, when you reach the 6min.42secs show the button you want. Thats it... To know about setInterval google it or catch me next time...

Personally I'd say you're on the right track with the cue-points.
You said you've put a cue point into the flv.

All you need to do now is add an event listener to your flv playback component to listen for cue-point events and a handler function to be called when a cue-point is detected by the listener.

The event handler should examine the cue-point event to determine which cue-point has been detected (if you have more than one) and then fire off another function to do whatever you need your main clip to do. (in your case making a button visible!)

It's been a while since I did anything with flash video and cue-points, so I'm a bit rusty. I haven't got time to put an example together right now either, but here are some links to a couple of tutorials you could check out:

Cheers for now,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.