0 Replies Latest reply on Sep 21, 2008 10:29 PM by premadas

    Pass value to another flex page

    premadas
      Hey All,
      "How to pass the value from one flex page to another flex page".
      In my first Flex page contains one textinput and one button".After entering the text into textinput box then the user clicks on the button.After the user clicks on the button, get the text from the textinput box and also send that text to another page(using navigaToURL() method i'm opening another browser).

      Second Flex page contains one text input (the first page textinput value i want to set in second page textinput ).

      here i'm sending my two files...

      First.mxml..

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" >
      <mx:Script>
      <![CDATA[
      import mx.controls.Alert;
      import flash.net.navigateToURL;
      import mx.controls.TextInput;

      public var fname:String;
      public function callBrowser():void{
      fname=fn.text;
      Alert.show("name : "+fname);
      var sim:simple=new simple();
      sim.fna.text=fname;
      navigateToURL(new URLRequest("second.swf"), "_self");

      }
      ]]>
      </mx:Script>
      <mx:VBox>
      <mx:TextInput id="fn"/>
      <mx:Button label="Ok" click="callBrowser()"/>
      </mx:VBox>
      </mx:Application>

      and Second.mxml

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" fontSize="12">
      <mx:VBox>

      <mx:TextInput id="fna"/>
      </mx:VBox>
      </mx:Application>

      Thanks in advance,
      premadas.