views:

104

answers:

2

Hey all..

I'm new to Flash. I have created a flv player that can play videos dynamically based on a user selection in a list component. I would rather not develop the user interface in Flash. Meaning, I'd like to bag the list component. Mostly because I am not very savvy yet. Is it possible to have javascript call actionscript? I would like to invoke an actionscript function that would accept a url as a string. Is this even possible?

I am developing this using ActionScript 3 BTW.

Thanks,

Nick

+5  A: 

Look into ExternalInterface
http://www.adobe.ca/livedocs/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html

Examples:
I'm not allowed to post more hyperlinks because I dont have enough rep.
So... search google for:
viget bi-directional-actionscript-javascript-communication

Good luck.

ItzWarty
+1 We better get you some more rep than!
Tyler Egeto
Yes we do. Thanks for this!
Nick
+4  A: 

Yes. Actionscript publishes available functions via the ExternalInterface class.

Take a look at this tutorial, or any other discussing ExternalInterface usage.

Michael Brewer-Davis
Thanks for the example.
Nick