views:

72

answers:

3

I want to create a site tour that plays an flv and then highlights different areas of the actual site while the flv is playing.

I would like to do this with AS3 and jQuery. I will probably try to use jw flv player for playing the video.

I know you can call JS from Flash, but it's been awhile since I've messed with Flash video and my google searches aren't turning up much for me.

I'm wondering what the best way to do this is. Should I use cue points in the flv or is there a better option? What would you do?

A: 

Listen to the cuePoint events and call js from those handlers using ExternalInterface

Amarghosh
+3  A: 
if (ExternalInterface.available) {
 ExternalInterface.call("javascriptFunction", parameters);
}
Ryan Smith
A: 

Don't forget to make sure that the return values of the JavaScript functions you call are not highly complex objects -- Flash has to encode them in XML then turn them into Actionscript objects, and if the object is complex enough, this could cause your script to lag and/or time out.

This happened to me once and it was a real pain to figure out...

Cameron