2 Replies Latest reply on May 21, 2011 8:26 PM by benk1234

    How to pass parameters to an Flex app?

    benk1234

      I am new to the Flex programming, and I need to pass a server
      generated paramter to my test Flex application below. Can someone show
      me a MINIMUM sized HTML page that can pass the "myName" parameter to
      my Flex app?

       

      Thanks in advance,

       

      Benk

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initVars()">
           <mx:Script><![CDATA[
          [Bindable]
          public var myName:String;
          private function initVars():void {
              myName = Application.application.parameters.myName;
          }
            ]]></mx:Script>
          <mx:Label text="Name:'{myName}'"/>
      </mx:Application>