2 Replies Latest reply on Dec 29, 2010 5:37 AM by jfb00

    Multiple FlashVars

    jfb00 Level 3

      Hi All,

      I cannot pass more than one parameter in flashVars.I can get the value of the first paramater.

      My code is below please take a look and let me know if I am missing anything.

      Thanks

       

      Johnny

       

      <noscript>
             <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                     id="myApp" width="100%" height="100%"
                     codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
                     <param name="movie" value="myApp.swf" />
                     <param name="quality" value="high" />
                     <param name="bgcolor" value="#869ca7" />
                     <param name="allowScriptAccess" value="sameDomain" />
                     <param name="FlashVars" value="param1=myValue1&param2=myValue2" />
                     <embed src="myApp.swf" quality="high" bgcolor="#869ca7"
                          width="100%" height="100%" name="myApp" align="middle"
                          play="true"
                          loop="false"
                          quality="high"
                          allowScriptAccess="sameDomain"
                          type="application/x-shockwave-flash"
                          pluginspage="http://www.adobe.com/go/getflashplayer"
                      FlashVars="param1=myValue1&param2=myValue2" >
                     </embed>
           </object>
      </noscript>
      

       

      Inside my flex app

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
      <mx:Script>
      <![CDATA[
      public function init():void{
           var parameters:Object = Application.application.parameters;
      //var parameters:Object = this.parameters;
           var param1:String = parameters.param1;
           var param2:String = parameters.param2;
           Alert.show(param2); //show null
      }