JavaScript uses code to invoke Flash display methods _javascript tips

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.