The examples in this article describe the way JavaScript calls Flash display through code. Share to everyone for your reference, specific as follows:
<script type= "Text/javascript" language= "JavaScript" src= "Scripts/swfobject.js" ></script>
< Script language= "javascript" >
function Load () {
var swfversionstr = "10.0.0";
var params = {};
Params.quality = "High";
Params.allowfullscreen = "false";
Params.allowscriptaccess = "Always";
Params.wmode = "Transparent";
swfobject.embedSWF ("flash/mainpage.swf", "Flashid", "597", "416", swfversionstr,params);
Call the method in Flash, "Swfid" is the ID
function SetValue (o) {Thismovie ("Flashid") of the SWF in the HTML page
. GetIDs (o);
Build JS and Flash Interoperability Environment
function Thismovie (moviename) {
if (navigator.appName.indexOf ("Microsoft")!=-1) { return
window[moviename];
} else {return
document[moviename];
}
}
</script>
More readers interested in JavaScript-related content can view this site: "JavaScript animation effects and tips Summary", "JavaScript object-oriented Tutorial" and "JavaScript data structure and algorithm skills summary"
I hope this article will help you with JavaScript programming.