Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript in flash?

Status
Not open for further replies.

yama

Programmer
Jun 28, 2001
69
SG
Hi, does anyone have any idea of whether javascript can be embedded in flash 5? if can, how to embed the script? thanks!
 
You can pass commands and arguments from a Flash movie out to JavaScript functions in the host HTML page. The format you need to use is:

fscommand(command,arguments);

The "command" name is picked up in JavaScript (it's the name of a nominated function) and the "arguments" are passed into that function. There's a dedicated publish option in Flash 5 to create an HTML page with the necessary DofS_command JavaScript code embedded so that all you have to do is add your function in an area usefully called "insert your code here".

It's pretty powerful and you can use the JavaScript to do anything from launch new pop-up windows to controlling embedded ActiveX components, all you have to do is write the necessary functions and pass parameters out to them.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top