On Flex 3 POPUPMANAGER

Hello


Yesterday, I had the chance to look of FLex POPUPManager. I have used his createUo and methods of removePop to dsiplay of containers on the form.
I couldn't find it that useful POPUpManger, because I think the same thing can be achivied by ActionScript, so please let me know if I'm wrong.

Please correct me if I'm missing anything related to this partners where to exactly.

Thanks in advnace.

Hi Kiran,

It is that concerns you doubt relating to pop-up Manager and the project in which you want the login window. Use the username and password both as

"admin". I worked on these classes you encounter in your other thread. Work in script action or mxml, you can use

Manager of pop-up window for this purpose.

Let me know if you have any doubt.

LoginEvent.as

package events
{
import flash.events.Event;
import Vos. User;
SerializableAttribute public class LoginEvent extends Event
{
public static const = "LoginEvent"; LOGIN_EVENT:String
public var user: user;
      
public void LoginEvent (type: String, user: user, bubbles: Boolean = false, cancelable: Boolean = false)
{
Super (type, Bubbles, cancelable)
This.User = user;
}
override public function clone (): event
{
return of new LoginEvent (type, user, bubbles, cancelable);
}

}
}

User.As

package vo
{
public class User
{
      
public var uname:String;
public var pass: String;
      
public void User()
{
          
}

}
}

LoginWindow.mxml


http://www.Adobe.com/2006/mxml"width ="400"height ="300"title ="Login">

    How to import events. LoginEvent;
import Vos. User;
public void CallMe (): void
{
var: User = new User();
User.uname = UITI.text;
User.Pass = PWDTI.text;
systemManager.dispatchEvent (new LoginEvent(LoginEvent.LOGIN_EVENT,user));
}
]]>

   
       
           
       

       
           
           
       

   

Test.MXML


http://www.Adobe.com/2006/mxml"layout ="absolute"width ="400"height ="300"backgroundColor ="0xDDDDDD">
  

MainApplication.mxml


http://www.Adobe.com/2006/mxml"layout ="absolute">

    Import mx.managers.PopUpManager;
Import mx.controls.Alert;
import Vos. User;
How to import events. LoginEvent;
       
var loginWindow:LoginWindow
private void 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 void 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);
}
on the other
{
Alert.Show ("Invalid userName or password");
}
}
]]>


     
 

with respect,

Mayeul Singh Bartwal

Tags: Flex

Similar Questions

  • How do I Center Align Alert.show () in flex

    Hi all

    I have a great Flex application that uses Alert.show () to display error/warning messages. This created problems when the error messages have been focused on the screen, but not visible when the screen is in a position of extreme scrolling (up or down). is it possible that I can display the alert in the center of the visible page of the user. I tried what follows, but did not work.

    var errorMsg:Alert = Alert.show("Error message");

    PopUpManager.centerPopUp(errorMsg);

    Thanks in advance.

    It depends on what the scroll.  centerPopUp() focuses on the scene.  If the step is larger than the display window and scrolls, you need to know about the viewport.  If the window is the browser, you might be able to get information about the viewport via ExternalInterface

  • SDK 4.6 PopUpManager.centerPopUp broken?

    I'm doing something very basic that used to work in 4.0 but seems to be broken in 4.6 (not tried 4.5).

    The titleWindow is launched properly, but now when focus is disappears from the display (not sure if she moved to a Center out of the screen, or it is a problem with z-index, etc.) - Preview?

    " < = xmlns:fx s:Application ' http://ns.Adobe.com/MXML/2009 "

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx".

    xmlns:maps = "maps.*.

    minWidth = "900".

    minHeight = "600".

    creationComplete = "complete () '"

    >

    ....

    public void Rollback(): void

    {

    var loginFormPopup: LoginForm;

    loginFormPopup = LoginForm (PopUpManager.createPopUp (DisplayObject (this), LoginForm, true));

    PopUpManager.centerPopUp (loginFormPopup);

    }

    Where LoginForm is just a titlewindow:

    < mx:TitleWindow

    ' xmlns:mx = ' http://www.Adobe.com/2006/MXML "

    xmlns:s = "library://ns.adobe.com/flex/spark".

    layout = "absolute".

    layoutDirection = "rtl".

    direction = "rtl".

    Width = "400".

    height = "200".

    horizontalScrollPolicy = "off".

    showCloseButton = "false".

    >

    .....

    I found the problem (which I think is still a bug):

    When the TitleWindow is set to layoutDirection = "rtl" the centerPopup seems to consider out of the screen. LayoutDirection = "ltr" (or default) the centerPopup to behave properly.

  • Flex 4.1 export of custom components in an Application or Module if used in the Module only?

    According to me, Miss me something here:

    "Because a module is loaded into a child domain, it has definitions of classes that are not in the area of the main application. For example, the first module to load the PopUpManager class becomes the owner of the PopUpManager class for the whole application because it records the Manager with the SingletonManager. If later another module tries to use the PopUpManager, Adobe® Flash® Player throws an exception.

    This technique also applies to components. The module that uses the first has the class of the component definition in its field. Therefore, if another module tries to use a component that has already been used by another module, its definition do not match the existing definition. To avoid a mismatch of definitions of element, create an instance of the component in the main application. The result is that the definition of the component is the property of the main application and can be used by modules in any field of the child. »

    I thought that if I use a component in one module then I won't be able to use it in application modules or a brother and I would be able to use it only in the Submodule of this module as the component definitions are in the scope of module which is a child of the scope of the application.

    So I just do a simple example: application with 2 moduleLoaders and 2 modules both using the same 3 components:

    (1) ButtonBar

    (2) DataGrid

    (3) CustomSkinnableComponent (empty, just extends SkinnableComponent) with custom skin (with a Rect 200 x 200 px, extends skin).

    I start the application--> two modules load without problem. Wasn't this supposed to cause error with the second loading module because the first module contains the definitions of components? Or does not result in an error because the component definitions match and match because my component is in the same project in flex, and in this case there is no problem. Problem will be if I have 2 or more RSL with the same definitions of package and class, but different features?

    I do not really understand how to cause incompatibility of definitions component so I can watch to avoid that it... can someone please explain?

    I'm confused and I thought I knew this kind of things. What Miss me?

    Also one last thing:

    I thought that if a module contains component definitions which means it is swf should grow in size-> due to the use of modules. If the application contains the definitions of components would not be what it means the application swf will grow in size and then-> why should I use a module? To save the memory of bodies and images/fonts embeded in the module?

    Bearing also in mind that the skin of a component is also a class definition and I incorporate some large images in there, and I use this skin in 2 modules, wouldn't that require skin to be implemented-> big size of swf application and no module swf as it should?

    Please someone shed some light in my foggy mind

    Post edited by: FM_Flame

    Pretty much:

    public var foo:Object;

    public function runTest (): void

    {

    If (Application.application.foo is nothing)

    Application.application.foo = new SomeClass();

    on the other

    trace (test (application.application.foo));

    }

    If you click the first button, then the second, you should see a type

    incompatibility.

  • PopupManager, sdk 4.1, reverse available

    Hi, I have a Flex 3 application, that I'm moving to the Flex 4 environment. I'm running it in Flex 3 compatibility mode, with the Halo theme. As a general rule, it works OK. However, all TitleWindows, panels, etc. which open with the PopUpManager are reversed. In other words, the page layouts seem to be a mirror image of the correct layout. Ditto for drop downs on comboBoxes. Finally, the text doesn't appear or is white. The browser uses Flash Player WIN 10,1,53,64

    I removed all the styles I defined in order to ensure that they were not causing it. I'm puzzled. Has anyone else seen elsewhere? I have not found references to this behavior on the forums.

    @TucsonJava,

    I updated the bug with additional solutions the other day.

    I think you should be able to use the original namespaces and still use the layoutDirection + direction without the need to convert the namespaces in mx + fx.

    In addition, you could try setting the direction + layoutDirections worldwide using CSS, as shown in the following example:

    (b) in the same way, if you use the old namespace 2006/mx, you could do something like this:

    
    

    (c) set the direction/layoutDirection styles in the world using a

    
        global {
            direction: ltr;
            layoutDirection: ltr;
        }
    
    
  • Flex popup with restricted movements?

    Hello

    I want a flex popup which does not move when the user tries to move, fixed at the current position. Is this possible?

    Why do you mean by Popup?

    I get a popup on any component, there is no default by dragging the behavior:

    var popup: canvas = new Canvas();
    Popup.Width = popup.height = 200;
    popup.setStyle ("backgroundColor", 0xFF0000);
            
    PopUpManager.addPopUp (popup, this);

  • Call for a class in a library of PopUpManager

    I have a class for connections that I put in a Flex library project.
    Part of the connection is a popup form (mxml) I created and is in the library.
    The problem I have is this line:
    loginPopUp = LoginForm (PopUpManager.createPopUp (this, LoginForm, true));
    The error I get is:
    1067: coercion of a value of type dataManagers:LoginManager to an unrelated type flash.display:DisplayObject.

    The 'this' parent point since its parent must be the application that called for the opening of the session.
    Can I make reference to the appellant to LoginManager class I created to feed popupmanager as a parent for the popup?

    The code in the application using the llibray which relates to this (to save space) is:
    ---------
    import dataManagers.LoginManager
    public var lm:LoginManager = new LoginManager();
    lm.initServices ();
    ---------
    ---------
    LoginManager.as

    package dataManagers {}
    import flash.events.Event;
    Import mx.managers.PopUpManager;

    public class {LoginManager
    Import LibraryViews.Login.LoginForm;
    public var loginPopUp:LoginForm;

    public void initServices(): void
    {
    Alert.Show ("start Login");
    appCFC = new RemoteObject ("ColdFusion");
    appCFC.source = "CFCS. Users.usersGateway ';
    appCFC.addEventListener (FaultEvent.FAULT, server_fault);
    appCFC.init.addEventListener (ResultEvent.RESULT, init_result);
    appCFC.getById.addEventListener (ResultEvent.RESULT, getById_result);
    displayLogin()
    }

    private function displayLogin (): void {}
    loginPopUp = LoginForm (PopUpManager.createPopUp (this, LoginForm, true)); THIS IS THE LINE of PROBLEM
    loginPopUp.addEventListener ("loginSuccessful", removeLoginPopup);
    }

    Removes the login form
    private void removeLoginPopup(event:Event):void {}
    PopUpManager.removePopUp (loginPopUp);
    }
    } //End class
    } //End package
    ---------
    ---------
    LoginForm.mxml
    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:TitleWindow xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" >
    < mx:Form width = "100%" height = "100%" defaultButton = "{loginBTN}" >
    < mx:FormItem width = "100%" label = "Username" required = "true" >
    < mx:TextInput id = "email".
    width = "175" text = "mltv" / >
    < / mx:FormItem >
    < mx:FormItem width = "100%" label = "Password" required = "true" >
    < mx:TextInput id = "password".
    displayAsPassword = "true".
    width = "175" text = "nuffer" / >
    < / mx:FormItem >
    < mx:VBox width = "100%" horizontalAlign = "center" >
    < mx:Button id = "loginBTN" label = "Login" click = "authenticateUser (); "fillColors =" [#80ff00, #80ff00] "/ >
    < / mx:VBox >
    < / mx:Form >
    < / mx:TitleWindow >

    I solved it by the way the parent when I called the parent project:
    lm.initServices (this);

    and then in the file .as created a var:
    private var theCallingParent:DisplayObject;
    theCallingParent = theParent;

    Then use this variable when I called the popup:
    loginPopUp = LoginForm (PopUpManager.createPopUp (LoginForm, theCallingParent, true));

    Sorry to clutter up the jury.

  • Complex issue of Flex application design

    I'm new to Flex and just started working on a retail online store application.
    However, I came across a problem and I'm stuck.

    Here is the structure of my application:
    I have an application file - Main.mxml and
    two modules - LoginModule.mxml & MainModule.mxml files
    and I load the module LoginModule.mxml by default and after a successful login, load MainModule.mxml


    The MainModule.mxml has a sample of flexstore similar viewstack
    and contains the elements of the view - Home.mxml
    Products.MXML
    ... etc.
    The Products.mxml's filter section, product catalog, shopping cart Panel
    (similar to ProductsView.mxml in the flexstore sample).

    Here's the question:
    Whenever I click on a control (checkbox, combobox.. etc) in the filter Panel
    I get an error message, as shown below:

    The box can be found here:
    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at mx.managers::PopUpManager$/addPopUp()
    at mx.controls::Alert$/show()
    at mbzprodsView::ProductCatalogPanel/filter()
    to GroceriesView / __filterPanel_filter)
    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at mbzprodsView::GroceryFilterPanel/::dispatchFilter()
    at mbzprodsView::GroceryFilterPanel/__cbBreadRoti_click()


    For Combobox, click:
    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at mx.managers::PopUpManager$/addPopUp()
    at mx.controls::ComboBox/::getDropdown()
    at mx.controls::ComboBox/::displayDropdown()
    at mx.controls::ComboBox/mx.controls:ComboBox::downArrowButton_buttonDownHandler()
    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    to mx.controls::Button / http://www.adobe.com/2006/flex/mx/internal::buttonPressed()
    at mx.controls::Button/mx.controls:Button::mouseDownHandler()

    However, the MainModule.mxml file works OK if I convert this component in a file of the Application of the Module.

    Not sure if it is a limitation of Flex 2 or I need to organize files in a different way.

    Any help will be greatly appreciated.

    Thank you very much

    Found the solution in Michael Ritchie's Blog. Thank you Michael. I lost two weeks of my time on this issue.

    Included the code below in the script of my application file block and it solved the problem:


    Import mx.managers.DragManager;
    Import mx.managers.PopUpManager;

    public var dm:DragManager;
    public var pm: PopUpManager;
    ]]>

  • Flex Time editing

    In logic when I flex RealEdit a trap there sometimes this unwanted metal sound... I thought making bounce down could solve the problem, but it doesn't!

    How can I fix?

    You use the mode cut?

  • Flex time markers appearing at random

    I currently mix an orchestral project, using individual records of each instrument. I use Flex Time (polyphonic) and Pitch Flex rather sparingly to align everything. However, sometimes I go to random to hear crackles when playing. I'm going to the incriminated violins and come back to Pitch Flex Flex Time and see a bunch of markers at random, causing the problem! I'm doing something for this to happen, or is a problem any? Help is appreciated!

    When you switch to polyphonic edition, logical adds markers to try to "AutoCorrect" synchronization problems, but them not activated unless you click on them once you change.

    What you hear is the bending of a track itself, poor attempt at correction of pitch and time logic. Unfortunately when using Flex, you will almost always get crackling, glitching or changing random pitch where the terrain changes were not made. It is unfortunately the nature of Flex.

  • Disappears Flex Time edits

    I just spent an hour or make adjustments to complex on a timing track in Flex Time (monophonic), then saved my work, am went until the beginning of the track and UN-solo had a collection of titles, switched mode Pitch Flex... and found that all of my arduous schedule changes had disappeared.

    I then did a "save under", saving the file to another drive to avoid overwriting everything I had saved.

    Then, I closed the project and reopened the last saved version.

    Calendar changes are passed in this version too. Return to Flex Time is not recover them.

    What on Earth just happened? How, when and why Flex Pitch interfere with synchronization settings? Where I could look at to try to recover all the work that I do?

    What must happen in order to validate my Flex Time changes so that they will not be wasted with? What I actually bounce the track in order to avoid this kind of obnoxious undo work? I hope that there is something that I'm missing here; This kind of program behavior is not OK.

    No past here.  I have tried and FP switching and return to monophonic retained the previous flex markers

    Try the Z command until you get back to where you were before - or you can use the previous version back up and select a backup prior to the changes, won't you.

    I use 10.2.4

    Edit: by making the backup as should not saved the changes you did, since it was saved to another project. Make sure that you actually re - open the original and of course obviously make sure that flex is a turn on and activate to the track in question.

  • The tracks window moving flex time marker move

    LPX 10.2.4, running I have the main window showing my pieces and, below, the editor, which I currently use for set Flex time markers.

    For some reason, in the last 15 minutes he began to behave differently in a way that has seriously slowed down my work: whenever I changed the position of the marker Flex - either through each dragging methods, either via Undo/Redo - the following two things were different from the usual behavior:

    • the waveform in the window of the tracks do not have a 'ghost' wave form which moved to reflect my drag in the editor, I did not see how the edit line non-sinusoidales wave the other tracks
    • the window of the tracks jumped at the beginning of the partition. He didn't budge from the read head, so pressing space twice more quickly got the rear window of the playhead near where I just changed, but it was confusing.

    This has solved the problem of the window mobile tracks:

    • clicking outside the audio region in the window tracks, to deselect the selected region
    • clicking New in this region to reselect it

    However, I still don't see the ghost waveform by dragging and I have no idea what was causing the odd behaviour.

    If you have any ideas of what could happen, please let me know.

    Sometimes, when the arrange window accurately displays the changes that I made to flex markers in the editing window I change flexible to bend the ground, then again for repeatedly bending and which allows a refresh of the region and flex markers and corrects the flex display in the region.

  • policy the United Kingdom retailer political flex

    Hello

    I bought 6 Iphone in the United Kingdom, but I want to use in Slovakia. The phone is unlocked, but after giving my Slovak SIM, it shows sim not supported. I want to ask that if I activate the phone with uk sim card, can I use the phone with sim card Slovak after release or could someone help me?

    Thanks for any helpful

    Add: it is blocked by politics decription uk-reseller-flex

  • Flex Time grey markers

    I recorded a guitar track in Logic Pro X and added rhythmic Flex Time with quantification and I didn't like the way it turns out so I wanted to change. I saved the project in order to come back later and now flex markers are grayed, and I can not change/remove the. I know that to have the 'flex' box checked for visible renderings. I can see them in the track, but they are not clickable. I tried to cancel the story, but it won't be enough to create projects. I also tried the transitional Mode Edit to remove the markers from there, but I can still hear the messy time to flex (I unstapled it and them added). I'm out of ideas at this point.

    Download you project so we can take a look

    www.wetansfer.com. file/link send to yourself - and then past the link here.

  • can I pay my monthly net flex with gift cards

    can I pay my monthly net flex with iTunes gift cards

    Yes, just make sure they keep your credit account, all payments will be taken from your credit before your card balance.

Maybe you are looking for