1. Build the environment of JS and Flash
functionThismovie (moviename) {if(Window.document[moviename]) {returnWindow.document[moviename]; } if(Navigator.appName.indexOf ("Microsoft Internet") ==-1) { if(Document.embeds &&Document.embeds[moviename])returnDocument.embeds[moviename]; } Else //if (navigator.appName.indexOf ("Microsoft Internet")!=-1) { returndocument.getElementById (moviename); }}
2. Provide a JS method to the as call
function Jsmethod (Arg) { // This is the method provided to the as execution }
3.AS provides a way for JS to invoke
// if the as left JS call method named Asmethod,flash ID is turnflash function turntablemove (num) { var timer = setinterval (function() { if( typeof Thismovie ("Turnflash"). Asmethod = = ' function ') { Thismovie ("Turnflash"). Asmethod (num); Clearinterval (timer); } ,// wait for Flash to finish loading to execute as method }
Ps:13 Year Practical Project (http://game.51wan.com/wkll/hd/sx/)
"Memory 1314" lottery flash big Carousel