The following snippet comes from the  Samples Explorer.  I have adapted
and simplified slightly to fit your situation:

var logonWindow:SimpleTitleWindowExample= new
SimpleTitleWindowExample();
  PopUpManager.addPopUp(logonWindow, this, true);

Hope that helps.

Bill Lane

--- In [email protected], poonam vora <[EMAIL PROTECTED]> wrote:
>
>   when am trying out this example,
>   i get errors.. am not able to understand what kinda mistake am
making?
>   or what has to be considered for such codes
>   please reply soon
>
>   --------
>   SimpleTitleWindowExample.mxml
>   ------------
>   <?xml version="1.0" encoding="utf-8"?>
>   <!-- Simple application to demonstrate TitleWindow layout container.
-->
>   <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
>
>       <mx:Script>
>           <![CDATA[
>
>               import mx.managers.PopUpManager;
>               import mx.containers.TitleWindow;
>
>               // Open the TitleWindow   container.
>               // Cast the return value of the createPopUp() method
>               // to SimpleTitleWindowExample, the name of the
>               // component containing the TitleWindow container.
>   private function showWindow():void {
> var
login:SimpleTitleWindowExample=SimpleTitleWindowExample(PopUpManager.cre\
atePopUp( this, SimpleTitleWindowExample , true));
>
>                    // Pass a reference to the TextInput control
>                   // to the TitleWindow container so   that the
>                    // TitleWindow container can return data to the
main application.
>                   login.loginName=returnedName;
>               }
>           ]]>
>       </mx:Script>
>
>       <mx:Panel title="TitleWindow Container Example" height="75%"
width="75%"
>           paddingTop="10" paddingLeft="10" paddingRight="10"
paddingBottom="10">
>
>           <mx:Button label="Click  to open the TitleWindow container"
click="showWindow();"/>
>
>           <mx:Text id="returnedName" text=""   width="100%"/>
>
>         </mx:Panel>
>   </mx:Application>
>
>
>   ----------
>   TitleWindowApp.mxml
>   -------------
>   <?xml version="1.0" encoding="utf-8"?>
>   <!-- Simple custom MXML TitleWindow component.
>        The TitleWindowApp application displays this component.
>        You cannot run it independently. -->
>
>   <mx:TitleWindow xmlns:mx=" http://www.adobe.com/2006/mxml"
>       title="Title Window" x="168" y="86">
>
>       <mx:Script>
>           <![CDATA[
>               import mx.managers.PopUpManager ;
>                 import mx.controls.Text;
>
>               // A  reference to the TextInput control in which to put
the result.
>               public var loginName:Text;
>
>               // Event handler for the OK button.
>               private function returnName():void {
>                    loginName.text="Name entered: " + userName.text;
>                   PopUpManager.removePopUp(this);
>               }
>             ]]>
>       </mx:Script>
>
>       <mx:HBox>
>           <mx:Label text="Enter Name:   "/>
>           <mx:TextInput id="userName" width="100%"/>
>       </mx:HBox>
>
>       <mx:HBox>
>           <mx:Button label="OK" click="returnName();"/>
>           <mx:Button label="Cancel"
click="PopUpManager.removePopUp(this);"/>
>       </mx:HBox>
>
>   </mx:TitleWindow>
>   --------------------
>   errors are
>
>   1   Access of undefined property SimpleTitleWindowExample.
>   2   Call to a possibly undefined method SimpleTitleWindowExample.
>   3   Type was not found or was not a compile-time constant:
SimpleTitleWindowExample.
>   4 Access of possibly   undefined property loginName through a
reference with static type SimpleTitleWindowExample.
>
>
>   please reply soon
>   thanks
>   poonam








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to