How to use javascript to pass parameters to SWF files? I found a complete tutorial on the Internet, which is very enlightening and practical. The following is a complete implementation step. If you need a complete tutorial, refer
Q: How to use javascript to pass parameters to SWF files?
I found a complete tutorial on the Internet, which is very enlightening and practical. The following describes the complete implementation steps:
Configure SwfObject:
Swfobject2 is the best method for detecting whether users install Flash. It is considered an 'industry standard', and all new versions of Adobe products (Flex4, Flash CS5) Use SwfObject to detect Flash Player.
Download, decompress the ZIP file, and copy the swfobject. js file to your web server. It is a good idea to create a root folder named 'js' under the root directory. (So the file location should be http://myserver.com/js/swfobject.js ). We will refer to this file in the HTML file created later. If you want to use the expressinstallfunction (for the user to perform a simple upgrade, copy expressinstall.swf to the same folder.
Configure HTML files:
The HTML file contains two Javascript files. A parameter used to capture the source URL. This was created by Matt White, which is simple but effective. The Code is as follows:
The Code is as follows: