Command|javascript
In the Web page, the Flash Player is able to communicate with the browser. You can use Fscommand () to send parameters to the browser in Flash, and then use Movie1_dofscommand () to get the parameters in the browser. MOVIE1 is the ID name of the SWF file that you gave in HTML.
Create a new flash, insert a button
Add as on the button
On (release) {
Fscommand ("Press");
}
· The function is to issue a FS Command named "Press" when the mouse presses the button.
· Then insert it into the Web page, giving it an ID name, such as "jimsons";
· Then add the following code in
<script language= "JAVASCRIPT" >
function Jimsons_dofscommand (Command,args)
The above is typically the format required to invoke the FS command, where "Jimsons" is the ID name of the Flash animation that is inserted into the Web page
{
if (command== "Press")
When FS command= "Press" (The FS command is issued when the button is pressed)
Alert ("Oh, don't touch me!") ");
Pop-up Warning menu, this is a statement that belongs to JavaScript
}
</SCRIPT>
<script language= "VBScript" >
Sub jimsons_fscommand (ByVal command, ByVal args)
Call Jimsons_dofscommand (command, args)
End Sub
</SCRIPT>
Using VBScript, when Flash emits an FS command, execute flash1_dofscommand (command, args);
FLASH1 is the ID of the Flash animation, which is the format that is generally required when using the FS command
Insert flash into the Web page and name its ID number jimsons as follows
<object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
Codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
Name= "Jimsons" width= "height=" id= "Jimsons" >
<param name= "movie" value= "http://www.webjx.com/htmldata/2005-10-08/jimsons.swf" >
<param name= "Quality" value= "High" >
<embed src= "http://www.webjx.com/htmldata/2005-10-08/jimsons.swf" width= "," height= "High" quality= "
Pluginspage= "Http://www.macromedia.com/go/getflashplayer"; Type= "Application/x-shockwave-flash"
Name= "Jimsons" ></embed></object>