3 Replies Latest reply on May 5, 2011 2:39 PM by brendalc1636

    Link to another file

    TKTBSheep

      sorry.I'm new with Flex.I have a two files of .xmxl.At the first file i have a one button i want to click it and go to the second file

      Sorry with my english.

      thank.

        • 1. Re: Link to another file
          brendalc1636

          Do you mean you want a pop up when the button is clicked?

           

          Or do you want the new component to replace the old?

           

          How is your application structured?

          • 2. Re: Link to another file
            TKTBSheep Level 1

            yes pop up when i clicked

            <?xml version="1.0" encoding="utf-8"?>
            <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                              xmlns:s="library://ns.adobe.com/flex/spark" 
                              xmlns:mx="library://ns.adobe.com/flex/mx"
                              xmlns="*" 
                              minWidth="955" minHeight="600" creationComplete="init()">
            <fx:Script>
                 import mx.controls.Alert;
                 import mx.rpc.events.ResultEvent;
                 
                 private function init():void{
                      
                      userRequest.method = "GET";
                      userRequest.send({"User":"1234","Pass":"1234"});
                      userRequest.addEventListener(ResultEvent.RESULT,OnResult);
                 
                 }
                 private function OnResult(ev:ResultEvent):void{
                      if(userRequest.lastResult.std.toString() == "true"){
                           Alert.show("OK","Status");
                      }else{
                           Alert.show("not OK","Status");          
                      }
                 }
            </fx:Script>
                 
                 
                      <mx:DataGrid id="dgUserRequest" dataProvider="{userRequest.lastResult.users.user}" horizontalCenter="-355" verticalCenter="-101">
                      <mx:columns>
                           <mx:DataGridColumn headerText="ที่นั่ง" dataField="id"/>
                           <mx:DataGridColumn headerText="สถานะ" dataField="status"/>
                      </mx:columns>
                 </mx:DataGrid>
                 <mx:TextInput id="selectedemailaddress" text="{dgUserRequest.selectedItem.std_id}"  horizontalCenter="-346" verticalCenter="3"/>
                 <fx:Declarations><mx:HTTPService id="userRequest" url="http://thebighead.co.cc/test/Table/getData.php" useProxy="false" method="POST"></mx:HTTPService></fx:Declarations>
            </s:Application>
            
            

             

            I want to pop up at OnResult event.

            • 3. Re: Link to another file
              brendalc1636 Level 1

              Here's a good link about the PopUpManager:

               

              http://forums.adobe.com/message/3658976#3658976