Monday, July 9

How to pass URL Parameter to Flash


  1. Learn what is FlashVars

  2. Add this code to your html when adding Flash object
  3. codebase=""http://macromedia.com/cabs/swflash.cab#version=6,0,0,0""
    WIDTH="250" HEIGHT="250" id="flaMovie1" ALIGN="CENTER">

    FlashVars VALUE="imageFilename=images%2Fimage1%2Ejpg">


    FlashVars="imageFilename=images%2Fimage1%2Ejpg"
    quality="high" bgcolor="#FFFFFF" WIDTH="250" HEIGHT="250"
    NAME="flaMovie1" ALIGN TYPE="application/x-shockwave-flash"
    PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
  4. Open Flash file (*.fla)

  5. Example use of query-string

  6. on (press)
    {
    getURL("page.php?catID="+_root.catID+"&state=KELANTAN&subcatID="+_root.subcatID);
    }

  7. catID was appended on the URL string

No comments: