2 Replies Latest reply on Jul 31, 2007 3:18 PM by Peter_Connolly

    flashvars

    boliz
      the example in livedoc doesnt work, the flashvars in flash works but not in flex

      Application.application.parameters.myName dosent work

      someone have some example for me?
        • 1. Re: flashvars
          upshotvideo Level 1
          are you doing this within a function, and when is that function executed? I make a function and have it execute with the "initialize" method the Application tag.
          [Bindable]
          public var user_id:String;

          [Bindable]
          public var sub_domain:String;

          public function initVars():void{
          user_id=Application.application.parameters.user_id;
          sub_domain=Application.application.parameters.sub;
          }
          • 2. Re: flashvars
            Peter_Connolly
            The problem is that their documentation shows the how you modify the <noscript> segments of the HTML. That only works if the browser you're testing with has javascript turned off. Not very likely. You have to modify the second block of code in the <script...> section above it to add the flashVars you need:

            } else if (hasRequestedVersion) {
            // if we've detected an acceptable version
            // embed the Flash Content SWF when all tests are passed
            AC_FL_RunContent(
            "src", "planner",
            "width", "650",
            "height", "605",
            "align", "middle",
            "id", "planner",
            "quality", "high",
            "bgcolor", "#fffac2",
            "name", "planner",
            "flashvars",'historyUrl=history.htm%3F&lconid=' + lc_id + '&yourvariable=' + ${someElExpressionOrWhatever} + '',
            "allowScriptAccess","sameDomain",
            "type", "application/x-shockwave-flash",
            "pluginspage", " http://www.adobe.com/go/getflashplayer"
            );
            } else { // flash is too old or we can't detect the plugin