0 Replies Latest reply on Sep 20, 2010 5:22 PM by ilya_k

    Passing parameters to Flex application

    ilya_k Level 1

      Greetings!

       

      I do not have any problem passing parameters from  JavaScript of HTML wrapper to

      a Flex application as follows:

       

      AC_FL_RunContent(

      "src", "main",

      "width", "100%",

      "height", "100%",

      "align", "middle",

      "id", "scc",

      "quality", "high",

      "bgcolor", "white",

      "name", "scc",

      "allowScriptAccess","sameDomain",

      "type", "application/x-shockwave-flash",

      "FlashVars", "locales=en_US, ja_JP, zh_CN",

      "pluginspage", "http://www.adobe.com/go/getflashplayer"

      );


      but can not make it working when passing parameters from  <object> and <embed>

      HTML tags in a case when JavaScript is disabled.:

       

      <noscript>

        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

      id="scc" width="100%" height="100%"

      codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">

      <param name="movie" value="main.swf" />

      <param name="quality" value="high" />

      <param name="bgcolor" value="white" />

      <param name="FlashVars" value="locales=en_US, ja_JP, zh_CN" />

      <param name="allowScriptAccess" value="sameDomain" />

      <embed src="main.swf" quality="high" bgcolor="white"

      width="100%" height="100%" name="scc" align="middle"

      play="true"

      loop="false"

      quality="high"

      allowScriptAccess="sameDomain"

      type="application/x-shockwave-flash"

      pluginspage="http://www.adobe.com/go/getflashplayer"

      FlashVars="locales=en_US, ja_JP, zh_CN"

      </embed>

      </object>

      </noscript>

       

      Sure it is not unique task and many blogs and some books explain

      how to do it, but does anyone really get it working?

       

      I am using FlashPlayer 10 with Flex  SDK 3.3 on WinXP. Tried both Chrome and

      IE 8 with same result.

       

      Code that reads params runs from within application complete handler and looks

      as follows:

       

              public static function getSuupporttedLocales():Array

              {

                  var locales:Object = Application.application.parameters.locales;; // <= always null

                  ...

      What do I do wrong?

       

      Thanks.