Need an event to find out when my components are no longer displayed

Greetings!

Funny that it is difficult to make such an obvious thing GUI development.

I have a series of custom components in a viewstack. When one of them get away because the user clicked to see another component, it should be able to know that it is removed! Or at least, there should be a 'aboutToBeDisplayed' event so that it can reset its content!

These obvious manifestations are in Java, MFC, QT, etc... But I can't find it in Flex!

Any help would be appreciated!

When a viewStack changes, the components are not explicitly added or removed.  They are just hidden and displayed.

You can do things with the show and hide the event:

http://www.Adobe.com/LiveDocs/Flex/3/langref/MX/core/UIComponent.HTML#event:show

http://www.Adobe.com/LiveDocs/Flex/3/langref/MX/core/UIComponent.HTML#event:hide

With a ViewStack, you can also use the change event:

http://www.Adobe.com/LiveDocs/Flex/3/langref/MX/containers/ViewStack.HTML#event:change

According to your specific needs, some may be better suited that relate to the components being added or removed from the scene:

http://www.Adobe.com/LiveDocs/Flex/3/langref/MX/core/UIComponent.HTML#event: Add

http://www.Adobe.com/LiveDocs/Flex/3/langref/Flash/display/DisplayObject.HTML#event: added

http://www.Adobe.com/LiveDocs/Flex/3/langref/Flash/display/DisplayObject.HTML#event:addedT oStage

http://www.Adobe.com/LiveDocs/Flex/3/langref/MX/core/UIComponent.HTML#event:remove

http://www.Adobe.com/LiveDocs/Flex/3/langref/Flash/display/DisplayObject.HTML#event:remove d

http://www.Adobe.com/LiveDocs/Flex/3/langref/Flash/display/DisplayObject.HTML#event:remove dFromStage

Tags: Flex

Similar Questions

  • Is there an event to find out when a reading of his judgment?

    I'm developing an ActionScript 3.0 for Playbook.

    I want to know when a sound has finished playing. All sounds are 1 second length.

    This is my code:

    import flash.media.Sound;
    
    ...
    
    private var yesSnd:Sound;
    private var noSnd:Sound;
    
    ...
    // Class constructor.
    yesSnd = new Sound();
    yesSnd.load(new URLRequest("assets/sounds/yes.wav"));
    
    noSnd = new Sound();
    noSnd.load(new URLRequest("assets/sounds/no.wav"));
    ...
    // Another method
    yesSnd.play();
    ...
    noSnd.play();
    

    By the way: can I play sounds on PlayBook?

    I'm agree with peter that even a simple search could have answered your questions I already had an example avalible. You must use the SoundChannel returned by the play() function to add.

    channel.addEventListener(Event.SOUND_COMPLETE, );
    
  • How to find out what the police are actually using Firefox?

    How to find out what the police are actually using Firefox?
    Inspect the element don't say what substitute fonts.

    Firefox 24 ESR has the tab fonts in the Inspector, which shouldn't be a problem.

  • W376g (tracfone) how can I find out when any text message arrived?

    Like all communications, WHEN something is said is critical to the context of what is said... How do I know WHEN a message has landed on my phone? I don't see time & date stamps for text messages.

    Thank you, JED

    Hi Jed, the phone also has an external icon that should be flashing when you have a message waiting... as well as an icon of the screen itself

    then during playback of the message... Press the arrow down to get the information of 'delivery '.

  • I need help to find out why my Canon photos will not display on my Picasa account

    I have a Canon Ixus 1100 HS and I'm trying to put them on a screen of Windows 7

    [Moved from the forum comments]

    Contact support Picasa.

  • Need a way to find out what tables are most active, active medium and less

    I know that the tables in a database are most/medium/least active, is there a way to know who?

    We don't have a grid control. So I want to know how you DBA to determine.

    Thank you.

    check v$ segment_statistics

    Search for physical reads and logical reads with high segments

    Source: google

    SELECT t.owner, t.table_name, lr.value + pr.value AS total_reads FROM (SELECT owner, object_name, the value OF v$ segment_statistics WHERE statistic_name = 'logical reads') lr, SELECT owner, object_name, value OF v$ segment_statistics WHERE statistic_name = 'logical reads') pr, t dba_tables WHERE lr.owner = pr.owner AND lr.object_name = pr.object_name AND lr.owner = t.owner AND lr.object_name = t.table_name STOPPED BY 3;

  • messages are sent from my windows live account on a mobile device and I am not not sending them is there a way to find out what these messages are

    I was told that people receive ims from me that I'm not sending I change the password on my account, but is there a way to know what sent my account

    Windows Live Mail help is in this forum
    http://answers.Microsoft.com/en-us/windowslive/Forum/LIVEmail?tab=all

  • I'm trying to find out if multiple users are allowed on a Muse CC account

    I have a friend who has a CC Muse monthly pay to access account. He realizes that he can put it on 4 computers. We wonder if there is an Access multiuser for a development of the sharing site. Or is it a question of sharing the collaboration site to one Adobe account to another?

    Muse subscriptions and CC are simple Adobe ID only.

    You can share your sites/assets of Muse through any cloud services such as Creative Cloud, Dropbox, iCloud etc. to work on the collaboration. However, given that only one person can work on a file at a time, or you will crush the other. You must also have the same version number of Muse.

  • Need a script to find the network interface which are broadcom?

    How can I get network cards shipped from dell and hp servers that come from the broadcom seller?

    You can determine the NIC broadcom by the driver is responsible for a network card.

    Try this oneliner:

    Get-VMHost | Get-VMHostNetworkAdapter |
      Where {$_.ExtensionData.Driver -like "bnx*"} |
      Select VMHost, DeviceName, Mac, @{N="Pci";E={$_.ExtensionData.Pci}},
        @{N="Driver";E={$_.ExtensionData.Driver}} | ft
    
  • How to find files whose path names are too long to copy to an external drive?

    Hello all,.

    I copied a folder containing files 6 854 into 1 329 folders on an external USB drive.  On the way, I got a total of 677 reviews "path too long name.  After the first few opinions, I clicked on the option "ignore all".

    Now I want to find the files that incriminated, whose name, or the path is too long to copy, and then copy them all to a single high level external hard disk folder.  Is it possible in Windows Explorer to search for names of files/paths that exceed this limit?

    Thank you

    ~ Jeffry

    Hello, WHS - frustrated.

    Because you are using Windows Home Server, please transfer this issue to the address provided below.

    Windows Home Server

    http://support.Microsoft.com/ph/12624

  • How can I find out what products are included on my SN LabVIEW?

    I found a serial number of LabVIEW for Version 8.6 (3rd quarter 2008) in the virtual library of the former employee.  I also have the disks for all NI Developer Suite.  How can I find out what software products are covered by this serial number?

    Simply contact the Tech Support directly. Go to the 'Support' page in the menu bar of NOR. They can tell you. Or, you can install all the software, providing the serial number, try to turn it on and see if it works.

  • Several components are listening to the same custom event?

    I tried to make the transition from Flash to Flex and I've been struggling with this one for the last two days. I used to do a lot of SEO _root.moviecontainer.mylable.text, but I'm trying to get the idea of demonstrations, dispatchevents, etc. down and get SEO for Flex to manage. The simple explanation of what I'm trying to do is to have a component triggers an event and either dynamic broadcast to all components that subscribes to this event (the number of components listen to will change during execution and so I don't want to directly refer to these objects). I would like to be able to generate other objects during execution and to associate them with this event dynamically. I tried to add an addListener (customEvent) to listen to the dispatchevent(), but I had no luck with this method until now. Raises the event, but I can't understand how to associate other components with it. I guess that having only three parts to it: the component that triggers the event, the event itself (custom) and the component that is listening for the event. And none of the components know anything of the any of the other components that exist. The trigger could be raising an event 3, 10, or 100, other components are listening, but he doesn't know how many elements are tuned, nor she cares & maybe even wait for one component which is capable of raising the event, he is listening the listening component, or there could be a total of 10 components capable of triggering this event. If you did it at the end of the present, thank you. This has been a headache for me, and I'd appreciate any help offered. Thank you.

    iTextArea is a brother of iButton and isn't in its parent chain, so it will not be a propagated event.

    Perhaps you could put a Manager in the Application that redistributes events and listen for them in iTextArea.

    Tracy

  • I've had an iPad for when they released first. How can I find out what operating system, I have to be able to update at the following system?

    I had an Apple iPad since when they went out first;  How can I know what version I have so I can upgrade to the latest version, I can use?  I also have a desktop computer Apple which is older than the iPad?  Thank you

    Parameters

    General

    On

    If you have had since it first came out, then it is very possible that you have a first generation iPad (if your ipad has no camera it's a first gen). If this is the case iOS 5.1.1 is the highest iOS, you can run

    If you have a newer version than the one you can do your research. Update to the latest iOS may require that you run the latest version of iTunes, but I know that mac set out operating systems often and cannot run the latest versions. So I would research before accidentally yourself updating you in a corner (some people update their live iPad (which came with iOS 6 I believe) and then find out that their computer can not run the most recent iTunes they need to synchronize their iPad to their mac.)

  • How can I find out if firefox is locked when I'm on a view of the Bank?

    When I get on an Internet site of the Bank to pay the Bills, how can I find out if firefox is locked if nobody sees what I'm doing?

    Looking for the blue color of the key of the identity of the Site. In addition, you can view the information on this web site by clicking on the Site identity button, the lock appears here.

    https://support.Mozilla.com/en-us/KB/site+identity+button

  • How can I find out what programs I should have started and what are the programs I can start myself to my computer to run correctly when starting?

    * Original title: startup

    How can I find out what programs I should have started and what are the programs I can start myself to my computer to run correctly when starting?

    Hello

    I understand you want to learn about programs, you should start your Windows startup. I will certainly help you to question.

    When you start Windows by using a normal startup startup, several applications and services automatically, and then run in the background. These programs include the base system, antivirus software, utility applications processes system and other software that was previously installed. These applications and services may cause interference when you install or run a program.

    The system configuration is a tool that can help identify problems that might prevent Windows from starting correctly. You can start Windows with common services and startup programs turned off and then reactivate them, one at a time.

    I suggest you to refer to the links below and check if this is useful:

    Using the Configuration System (msconfig)

    Perform a clean boot to determine if background programs interfere with your game or program

    Hope this information helps.

    Please get back to us with an update on the issue, we will be happy to help you.

Maybe you are looking for