Popup Manager In AS3

What's the code for creating a Popup Manager in AS3?

Hi --
I believe that this has been removed from AS 3, at least for
the moment. I
myself was looking for a way to create a simple pop up box
and had to write
one myself.
Rich
"bdq1772" <[email protected]> wrote in
message
news:fjbsvh$idi$[email protected]..
> What's the code for creating a Popup Manager in AS3?

Similar Messages

  • PopUp Manager and Flex Forum PopUps

    I wanted make sure I understood what someone on the Forum told me about the PopUpManager and TitleWindow.
    My question was:  "How are the PopUps that appear when you hover over a person's image/profile on the left side of this Adobe Forum's page done?  Did you use Flex for this, or are they some type of Ajax thing?  If Flex was used was it done with the PopUp Manager based on the TitleWindow.  This is exactly the kind of PopUp I need, especially because it has a larger hit area than most PopUps which dissapear when the mouse exits the button or textarea acting as a button.
    Thanks and Sorry for the long version.
    Doug

    Hi,
    Same  thing is simple to acheive in flex.You can try the code below.Let me know if you have any issue with this.
    MainApplication.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
         verticalAlign="middle">
        <mx:Script>
            <![CDATA[
                import mx.managers.PopUpManager;
                private var bool : Boolean;
                private var myPopUp:MyPopup;
                private function onMouseOver():void
                    if(bool == false)
                        if(myPopUp != null)
                            PopUpManager.removePopUp(myPopUp);
                            myPopUp = null;
                        myPopUp = MyPopup(PopUpManager.createPopUp(this, MyPopup, false));
                        myPopUp.move(700,400);
                        var infoObject : Object = new Object();
                        infoObject.imagePath = 'assets/img1.png';
                        infoObject.name = "David";
                        infoObject.country = "United Kingdom";
                        infoObject.profession = "Software Developer"
                        infoObject.domain = "Banking";
                        myPopUp.info = infoObject;
                        bool = true;   
                private function onMouseOut():void
                    bool = false;
                    if(myPopUp != null)
                        PopUpManager.removePopUp(myPopUp);
            ]]>
        </mx:Script>
        <mx:Image source="assets/img1.png" mouseOver="onMouseOver()" mouseOut="onMouseOut()"/>
    </mx:Application>
    MyPopup.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" width="250" height="300"
        title="Author Information">
    <mx:Script>
        <![CDATA[
            private var _info:Object;
            public function get info():Object
                return _info;
            public function set info(value:Object):void
                _info = value;
                if(value != null)
                    imgImage.source = info.imagePath;
                    nameLbl.text = info.name;
                    countryLbl.text = info.country;
                    professionLbl.text = info.profession;
                    domainLbl.text = info.domain;
        ]]>
    </mx:Script>
        <mx:VBox width="100%" height="100%" horizontalAlign="center" verticalAlign="middle">
            <mx:Image id="imgImage" buttonMode="true" useHandCursor="true"/>
            <mx:Label id="nameLbl"/>
            <mx:Label id="countryLbl"/>
            <mx:Label id="professionLbl"/>
            <mx:Label id="domainLbl"/>
        </mx:VBox>
    </mx:TitleWindow>
    with Regards,
    Shardul Singh Bartwal

  • Popup manager problem

    Hi,
            I am  loading the module in my main application. If i press the button in the loaded module, the current module will be unloaded and the popup browser window will be opened. In which i am using  some other application to load the module which was recently unloaded  in the main application.
    If i use the alert.show("") in the module opened in the popup browser window i am getting following errror
    TypeError: Error #1034: Type Coercion failed: cannot convert mx.managers::PopUpManagerImpl@54769861 to mx.managers.IPopUpManager.
    But the same alert.show in the  module is working while loading in the main application .
    Regards,
    Thiru

    Try adding this to the main application:
    <mx:Script>
    <![CDATA[
         import mx.controls.Alert; Alert;
         import mx.managers.PopUpManager; PopUpManager;
    ]]>
    </mx:Script>
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Popup manager

    I have a flex screen where in order to update certain records
    a popup screen appears. In order for the popup to appear I am using
    the following code:-
    var pop1:ContactArrayEntryFormReport =
    ContactArrayEntryFormReport(
    PopUpManager.createPopUp(this.parent.parent,
    ContactArrayEntryFormReport, true));
    pop1.title="Update Record";
    pop1.showCloseButton=true;
    PopUpManager.centerPopUp(pop1);
    What I want to do is to add some code in this class where the
    popup is created, which executes as soon as the popup is closed.
    e.g. in this ver class I have a method:-
    private function checkValidity():void
    which I want to call as soon as the popUpManager is
    closed.

    Check out this tutorial:
    http://flexperts.blogspot.com/2009/03/create-pop-up-dialog-box-component-in.html
    you can listen for the close event and have it do
    something.

  • PopUp Manager Errors

    Hi,
    I modified the example from
    http://livedocs.adobe.com/flex/2/langref/mx/containers/TitleWindow.html
    and tried to add some components so that I can pass the variable to
    another HTTPService and store the variable from the child window to
    the database.
    So far I have not seen any errors from the execution, except
    that I see the entry I try to insert into the database is always
    null for the value from the titlewindow. Can anyone please give me
    a pointer or two on this?
    Thanks in advance.
    Alice

    From what I see here, you are using:
    creationComplete="new_scenario.send()"
    ...on the application tag to send the HTTPService before the
    returnedName text control has anything in it. So you are sending a
    null to your PHP page.

  • Flex builder with AS3 project

    Hi,
    I am developing a Flash game using as3, I chose flex Builder with an AS3 project. Now I am thinking that if selecting the project to be a flex project instead of as3 project I would have a lot of flex functionality like a swf loader,preloaders and the popup manager etc. The graphic components would obviously have been made in flash and used through the swc (avoiding the heavy mxml components).
    Need to know what other developers think of this approach.

    You must include in library:
    ${FRAMEWORKS}/locale/{locale}

  • How to open the popup with in Tab navigator  working area.

    Hi,
              I using the customized  panel to open it as popup by using  popup manager in the Tab navigator . The popup should be able to  move with in the tab navigator's  content area. Not outside of the tab navigator's  content area. How to do this? .What is the difference between opening the popup by using popup  manager and add children(); which one is best?
    Regards,
    Thiru

    It depends on your purpose. A popup displays information to the user, and it might be modal if the user should repsond to the popup before continuing, but why constrain it's movement to the space occupied by the TabNavigator.
    You could, in theory, check the x and y properties of the popup position, and then compare those with the x and y of the TabNavigator view area, though you might have to do some conversion between global and local coordinates.
    You might want to consider your design. Is a popup necessary? Perhaps not. If so, maybe do not consider constraining its movement as you have indicated.
    If this post answers your question or helps, please mark it as such.

  • How to make content of af:popup dynamic? Component Value is not updating.

    HI,
         I am not able to update the component used in af:popup dynamically.
         In my case, the value of the component used in the popup is updated every time before opening the popup.
         I am building the af:popup. I am using component binding for my components. And I am setting data in the component using the component in the Managed bean only. The getter method for every component that I bind gets called only once i.e. while loading of the page. So when ever I change any thing in the component in managed bean, it is not reflecting in JSPX page. Coz it not calling the getter method of the component, so it is not getting the updated status for the component. But if you refresh the page you will get the updated component.
         Following is the sample code to simulate my problem,
         JSPX Page:-
    <af:commandButton text="RCF Dialog (Without Script)" id="button1"
    windowHeight="600" windowWidth="600">
    <af:showPopupBehavior popupId="samplePopup" alignId="button1"
    align="afterEnd"/>
    </af:commandButton>
    <af:popup id="samplePopup" clientComponent="false"
    contentDelivery="lazyUncached">
    <af:dialog title="Sample Dialog Test" modal="true"
    cancelVisible="true" okVisible="true">
    <af:inputText label="Label 1" value="#{searchField.myValue}"/>
    <af:inputText label="Label 2" binding="#{searchField.textField}" />
    </af:dialog>
    </af:popup>
    Managed Bean:-
    public static int count = 1;
    private String myValue = null;
    private CoreInputText textField = new CoreInputText();
    public String getMyValue(){
    String value = "MESSAGE_" + count;
    System.out.println("Count ==>" count " Value ==>"+value);
    count++;
    return value;
    public CoreInputText getTextField() {
    //Get called only once at the page load.
    textField.setValue(getMyValue()+"_XXX");
    return textField;
    public void setTextField(CoreInputText textField) {
    //Get called every time dialog is opened.
    this.textField = textField;
    Please let me know what to do make the content of the af:popup dynamic.
    Any suggestions are welcome.

    HI,
    I have simulate my problem using one text field component in side the popup. It is the same way that i am using. In my case there is more code in the constructor of the dialog bean.
    Following is the code,
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <af:document title="Popup Demo">
    <af:form>
    <af:spacer width="10"/>
    <af:commandButton text="RCF Dialog (With Script)" id="button"
    actionListener="#{mainScreen.processAcion}"/>
    <f:verbatim>
    <![CDATA[
    <script>
    function launchSampleDialog() {
    var popup = AdfPage.PAGE.findComponent("samplePopup");
    var hints = {};
    hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_OVERLAP;
    hints[AdfRichPopup.HINT_ALIGN_ID] = "button";
    popup.show(hints);
    </script> ]]>
    </f:verbatim>
    <af:popup id="samplePopup" clientComponent="false" contentDelivery="lazyUncached" >
    <af:dialog title="Sample Dialog Test" modal="true" id="dialogId" cancelVisible="true" okVisible="true">
    <af:inputText label="Label 1" />
    <af:inputText binding="#{dialogBean.textField}" />
    </af:dialog>
    </af:popup>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    //Main Screen Bean set in session scope.
    public class MainScreenBean {
         private static int count = 1;
         public void processAcion(ActionEvent event){
    String updatedData = "ABCDEFG__" + count;
    System.out.println("Inside process Action of Main Bean. Data set in Scope ==>" +updatedData );
    FacesContext facesContext = FacesContext.getCurrentInstance();
    facesContext.getExternalContext().getSessionMap().remove("dialogBean");
    AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
    afContext.getProcessScope().put("updateData", updatedData);
              count++;
    ExtendedRenderKitService service = Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
    service.addScript(facesContext, "launchSampleDialog();");
    //Popup Dialog Bean set in session scope.
    public class DialogBean {
    private RichInputText textField = null;
    public DialogBean() {
    textField = new RichInputText();
    textField.setLabel("Custom TextField");
    AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
    textField.setValue(afContext.getProcessScope().get("updateData"));
    System.out.println("Data From Scope in Dailog Bean = " + afContext.getProcessScope().get("updateData"));
    RequestContext.getCurrentInstance().addPartialTarget(textField);
    public RichInputText getTextField() {
    System.out.println("Inside getter for the component in Dailog Bean. Value = " + textField.getValue());
    return textField;
    public void setTextField(RichInputText textField) {       
    AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
    //Uncomment following line and run again. It will start showing updated value. But this will get called many times.
    //textField.setValue(afContext.getProcessScope().get("updateData"));
    System.out.println("Inside setter for the component in Dailog Bean. Value = " + textField.getValue());
    this.textField = textField;
    }

  • Best way to make title-free, margin-free popup up window

    hi,I have been using the popup manager a lot, no big problems
    with it generally. However, now I want to add some floating popups
    that are very custom in look and feel. I was playing around with
    the panel container, but it is already too specific (i dont want a
    title, i may not want a border). Really, I would like to just add a
    floating sprite or something like that. Whats the best way of doing
    this? What I want is a super bare-bones window.

    You can use a Canvas or any other container that suits your
    need If I'm not wrong.

  • Cannot undeploy from Management Server

    Hi all,
    I am trying to undeploy a plugin from the Managent Server, but I get the following popup:
    Management Agent for Management Service <hostname>:4890_Management_Service is not UP. Can not undeploy EMC VMAX Array. pluginThe following have been tried but do not help:
    - restart OMS + Agent
    - restart WebLogic Admin Server
    This is now a showstopper and I don't know where to look for this.
    Any suggestions highly appreciated!
    Thanks,
    Ed
    Edited by: 977814 on May 8, 2013 4:37 PM

    Hi Leighton,
    Thanks for the feedback. I just checked status oms and it seems fine:
    [oracle@dwbi-durl-oel agent_inst]$ $OMS_HOME/bin/emctl status oms
    Oracle Enterprise Manager Cloud Control 12c Release 2
    Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
    WebTier is Up
    Oracle Management Server is UpYes, my plugin is still listed. I always use the following commands to undeploy:
    emcli delete_target -name="$TARGET_NAME"    -type="$TARGET_TYPE_NAME"
    emcli undeploy_plugin_from_agent  -plugin="$PLUGINID" -agent_names="$AGENT_NAME"
    emcli undeploy_plugin_from_server -plugin="$PLUGINID" -sys_password="$SYSPWD"I think the issue may be caused by another plugin. Will dig further.
    Thanks,
    Ed
    PS That hostname slipped through into the post. Just removed it :)

  • Macromedia Flash won't work

    Hello, Folks, I am having problems with any webpage that uses
    "flash" animation. (Please be kind- I know mechanics and hands-on
    things, but have a hard time with computers!) I have read some of
    the threads here that deal with a similar topic, but don't
    understand a lot of what I read. You guys are WAY above my head.
    I am running Windows XP and IE 6. I recently ran the
    Microsoft Windows updates (on April 02, I think, so I don't know if
    it included the troublesome Active-X change or not). Now it seems
    that some of the video/ picture features just aren't working right.
    If I hold the cursor arrow over the place where the animation
    should be, I get a message that says "click to activate or use this
    control", but clicking does nothing. Right-clicking, then selecting
    "settings" brings up a control panel for Macromedia Flash Player 8.
    I selected "Allow" and "remember", but no change. I tried updating
    the Macromedia, but it didn't help; completely wiping out the
    program and reinstalling, as suggested by Macromedia, didn't work
    either.
    I have turned off pop-up blockers, emptied temporary and
    cookie files, etc. to no avail. The animated pages WORK when logged
    in under my wife's name. (!?) The Macromedia page works and runs
    under her name, and shows that the program is installed, which it
    will not do under my user name. I have disabled the Microsoft IE
    pop-up blocker, and a "Popup Manager" program on my username, and
    it still won't work. All of these are running on hers, too (and are
    not disabled). Any ideas where to start? What would be different
    from one username to another that would cause this?
    Okay, some more information. The yellow pop-up bar ("Pop-up
    blocked") under the toolbar never appears, so I never have a chance
    to click on it to allow the information.
    I tried loading Mozilla Firefox, and loaded the appropriate
    Mcromedia version for it, and Mozilla does the exact same thing-
    just blank boxes where the animation should be. The animated pages
    still work, on IE and Firefox, on my wife's sign-in pages.
    I am running AVG antivirus, Ad-Aware SE Personal, CCleaner,
    Spysweeper, Spybot Search and Destroy, PopupManager, and
    Spywareblaster. I have disabled these as much as I know how, but
    nothing changes.
    Thinking more on this, a month or so back Trend Micro online
    virus scan found an infection by a virus named Anyman or something
    to that effect. It recommended removing a file, which I believe was
    a .dll file, but I am not sure of specifics. Normally I keep good
    documentation of such things, but the paper I wrote this down on
    has disappeared. Is there a file linked to animation that would be
    found in each individual user's section of XP, that possibly could
    have been deleted only from mine? Any good way to find it?
    I truly appreciate your consideration. Thanks again,
    Woodtroll

    I think the solution is a matter of directory permissions.
    Make sure your login/user has the same permissions as your
    wife's login/user. It might just be a matter of changing your
    account type to administrator in the User Accounts control panel.
    You should especially check that you have permissions to:
    Windows C:\Documents and Settings\[username]\Application
    Data\Macromedia\Flash Player
    This is where flash stores it's cookies and Flash could be
    having trouble changing them due to lack of permissions under your
    login so it can't make any changes to your Flash Player settings.
    I had the same problem when logging in to the network at
    work.
    If I logged in to the PC via the network server Flash would
    display the symptoms you're describing. Different user logins to
    the server would not work either but if I logged in to the PC
    locally, Flash worked fine. I think this is because when logging in
    via the network server, Flash tries to store the cookies on the
    server and it can't. I'm going to try to get the network manager to
    allow Flash access to this directory and hopefully that will fix
    the problem.
    Good luck to you, I spent a lot of hours finally figuring
    this out.
    -Joe

  • PApplet/component is always above all other components except...

    Hi,
    I am working with java and a program off shoot of Java called Processing. Processing aids in the creation of java and it integrates itself into a swing component by extending into a PApplet(Processing�s version of an applet) which a JFrame sees as a component.
    Example:
    newJFrame.add(PApplet); <--- works perfectly except�
    The integration of java/swing and processing in an application works very well except for one problem. The Processing class (PApplet) draws to the screen and when I put it into a JFrame, JPanel, JInternalFrame, etc � the graphics are always above all other component except the JMenuBar. I found a fix for the JMenuBar to be this line of code �JPopupMenu.setDefaultLightWeightPopupEnabled(false);� I guess it tells the popup manager of the JMenuBar to not setDefaultLightWeightPopupEnabled which in turn, allows the JMenuItems to popup above the PApplet.
    Is there a way to force the PApplet/component to follow the rules of all other components? (setComponentZOrder, setLayer, etc�) It works for the JMenuBar so I feel it should be able to work for all other components � is there a way?
    Thanks,
    4dplane

    Thanks for the info; I believe you hit the nail on the head. Processing is open source so I looked in the PApplet class and it extends Applet, so this means processing is awt based.
    Thanks,
    4dplane

  • PopUpManager - change background color?

    Hi,
    By default PopUpManager creates transparent blurish background under the popups.
    I would like to have popup with BLACK trasparent blurish background under it.
    Does anybody know how to change the color of this background?
    Mariush T.
    http://mariusht.com/blog/

    Hi,
    You just need to set the background color for the component based on which you create the popup, like on this link:
    http://old.nabble.com/-flex_india:22228--Effects-for-titlewindow-in-popup-manager-td235242 76.html
    Stephanie

  • Load and open swf in new window

    Hi everyone,
    I have 2 flex applications named login and game. When the user logged in, I want the login swf to load the game swf and open it in a new window once it finished loading. I tried popup manager and title window but they only made the swf popped up INSIDE the app itself (which is the login swf). What I really want is to be able to load and open the game swf in a brand new popup window.
    Please help. Thanks.

    Loggin in is a classic example of when to use states.
    The base state will be your app, and the "login" state will be your login state. Set the application currentState to 'login' in the creationComplete event.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      creationComplete="this.currentState='login'">
      <mx:states>
        <mx:State name="login">
          <mx:RemoveChild target="{vb}"/>
          <mx:AddChild>
            <mx:Form>
              <mx:FormHeading label="Login"/>
              <mx:FormItem label="Username:">
                <mx:TextInput/>
              </mx:FormItem>
              <mx:FormItem label="Password:">
                <mx:TextInput displayAsPassword="true"/>
              </mx:FormItem>
              <mx:FormItem>
                <mx:Button label="Login" click="this.currentState=''"/>
              </mx:FormItem>
            </mx:Form>
          </mx:AddChild>
        </mx:State>
      </mx:states>
      <mx:VBox id="vb" width="100%" height="100%">
        <mx:Label text="Login Done - Now in Main App"/>   
      </mx:VBox>
    </mx:Application>

  • About Flex 3 POPUPMANAGER

    Hi ,
    Yesterday i got a chance to look at FLex's POPUPManager . i have used its createUo and removePop Methods to dsiplay Containers on to the Form .
    I couldn't find it this POPUpManger useful , because i feel that the same thing can be achivied by ActionScript , so please let me know if i am wrong . 
    Please correct me if i am missing anything related to this related to where it is exactly useful . 
    Thanks in advnace .

    Hi Kiran,
    This is with Reference to you doubt about popup manager and the project in which you want the Login window. Use user name and password both as
    'admin '. I have worked on those classes which you are having in your another thread.You work either in action script or mxml you have to use
    Popup manager for this purpose.
    Let me know if you have any doubt.
    LoginEvent.as
    package events
        import flash.events.Event;
        import vo.User;
        public class LoginEvent extends Event
            public static const LOGIN_EVENT:String = "LoginEvent";
            public var user : User;
            public function LoginEvent(type:String,user:User,bubbles:Boolean = false, cancelable:Boolean = false)
                super(type,bubbles,cancelable)
                this.user = user;
            override public function clone():Event
                return new LoginEvent(type,user, bubbles, cancelable);
    User.as
    package vo
        public class User
            public var uname:String;
            public var pass:String;
            public function User()
    LoginWindow.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300" title="Login">
    <mx:Script>
        <![CDATA[
            import events.LoginEvent;
            import vo.User;
            public function CallMe():void
                   var user:User = new User();
                user.uname = UITI.text;
                user.pass = PWDTI.text;
                systemManager.dispatchEvent(new LoginEvent(LoginEvent.LOGIN_EVENT,user));
        ]]>
    </mx:Script>
        <mx:Form x="183" y="179">
            <mx:FormItem label="UserName">
                <mx:TextInput  id="UITI" />
            </mx:FormItem>
            <mx:FormItem label="Password">
                <mx:TextInput id="PWDTI"/>
                <mx:Button label="Button" click="CallMe()"/>
            </mx:FormItem>
        </mx:Form>
    </mx:TitleWindow>
    Test.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300" backgroundColor="0xDDDDDD">
       <mx:Label text="This is Test Module."/>
    </mx:Module>
    MainApplication.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.managers.PopUpManager;
            import mx.controls.Alert;
            import vo.User;
            import events.LoginEvent;
            var loginWindow:LoginWindow
            private function onCreationComplete() :void
                loginWindow = LoginWindow(PopUpManager.createPopUp(this, LoginWindow, true));
                loginWindow.move(((Application.application.width/2)-(loginWindow.width/2)),((Application. application.height/2)-(loginWindow.height/2)));
                systemManager.addEventListener(LoginEvent.LOGIN_EVENT, onSuccessfullLogin )
            private function onSuccessfullLogin(event : LoginEvent) : void
                var user : User = event.user as User;
                if( user.uname == 'admin'  && user.pass == 'admin')
                    testModuleLoader.url = "Test.swf";
                    PopUpManager.removePopUp(loginWindow);
                else
                    Alert.show("Invalid userName or password");
        ]]>
    </mx:Script>
      <mx:ModuleLoader id="testModuleLoader" width="500" height="500" creationComplete="onCreationComplete()">
      </mx:ModuleLoader>
    </mx:Application>
    with Regards,
    Shardul Singh Bartwal

Maybe you are looking for