0 Replies Latest reply on Jan 2, 2012 5:34 PM by fech1985

    flashvar problems

    fech1985

      Hi,

       

      I'm trying to use Flashvars in my jsp application, it had worked once, but then I restarted my machine and it stopped

       

      in my flex app I define a var like so

       

      <fx:Script>

                          <![CDATA[

                                    [Bindable]

                                    public var username:String;

       

                                    private function init():void

                                    {

                                              username = this.parameters.username;

                                    }

                          ]]>

                </fx:Script>

                <s:Label right="10" top="10" text="Welcome {username}"/>

       

      In the jsp page I'm hard coding the value for username

       

      <script type="text/javascript">

                 var flashvars = {username:"hi"};

                 swfobject.embedSWF(

                      "appbar.swf", "flashContent",

                      "1100", "300", "9.0.0",

                      flashvars);

              </script>

       

      I also tried

       

      <object id="flashContent">

                 <param name='flashvars' value='username=hi'/>

              

              </object>

       

      the value always comesback as null