How can I write code to serve 2 events at the same time?

Hi all

I want to join 2 events and run the code (ie. a function) when they the head both http data will be valid data.

client.listener.onData = {function(event:HttpDataEvent):void}
var stringData:String = event.readUTFBytes ();

var data: ByteArray = event.bytes;
Debug.Warning (StringData);
};

client.listener.onComplete = {function(event:HttpResponseEvent):void}
answer: var HttpResponse = event.response;
var cookieStr:String = response.header.getValue("Set-Cookie");
};

Is there a method I can use here?

Chris

Use two flags, one set by each of the listeners.

Other areas of the code can check the two flags, and when they are both defined, then the other code can run.

Tags: Flex

Similar Questions

  • How can I remove everything unnecessary and/or deleted at the same time

    When I clear my balls and/or remove things from my e-mail, I can't remove it all at once... must be done individually. How can I at the same time instead of each of them

    Hello

    Thanks for posting in the Microsoft Community. The question that you stated that you want to delete the mails in the Mail application at the same time. We are here to help you.

    Here's what you need to do.

    a. open the folder in which you want to delete E-mails.

    b. Select one of the Emails.

    c. press the CTRL + A on the keyboard (this will select all Emails in the folder).

    d. press the clear key that will remove the selected emails.

    I hope this helps. Please get back to us if you have any other questions; We are here to help you.

  • How can I change font family of all titles at the same time?

    I used the first cs 6 to add some titles be subtitles, but I need to change the font family, how to change their entire family of fonts at the same time? Thank you

    You can not.  For now, it's both.  But it would be nice if the PP had a kind of this feature of type CSS, where you can set fonts, sizes, colors, etc. in one 'preset' and have these parameters to ripple through all titles of the project whenever the preset has been changed.  Please tell Adobe you want such a feature.

    https://www.Adobe.com/cfusion/mmForm/index.cfm?name=wishform

  • How can I install El Capitan on several computers at the same time?

    I live in Spain, where I have a few computers to service. The internet lines here are slow and unstable, so it is difficult to get all of the updates in without entering the trail other activities.

    I wonder if it is possible to download El Capitan on a single computer and then distribute to others, after which I can update at the same time am.

    Would this be possible?

    According to the license agreement, the license of the OS is for you only, but you can install on any computer YOU own and control. So if download you it and then reject the Setup program before you start, you can find it in your Applications folder from where you can copy it somewhere safe to use on another computer that you own.

    Because the download is linked to your Apple ID, use it on another computer does not work as it should download it using their own Apple ID or they will never be able to reinstall or update that the used ID does not correspond to their.

    And, since you said you 'service' of computers, you will need to look at another type of license - you will need to contact Apple. The retail license is nothing for you.

  • How can I request a preset to multiple pictures at the same time?

    I'm almost embarrassed to ask this, because it seems so simple. But I am new to LR and need help.

    I want to apply a preset (exmample, a preset that resembles the film) to multiple pictures at the same time. (similar to edit in Photoshop batch) but I want to want the balance of whites etc is necessarily the same thing, of course. Help, please!

    Make that 99jon wrote, then select all the thumbnails of the images you want to apply a preset. (ctrl + click is sometimes a bit boring to select different in the grid images when browsing a large number of them. consider using the spray can and apply a label of color to the images you want brand. and then filter for color you "pulverized").

    After selection there is no need to switch to the module development for appl a saved preset. In the library module go to quickly develop Panel and select the preset from the "Preset" drop saved.

    Make sure that the preset affect only the properties you want to change. If the white balance must remain intact, then check the box for the white power off balance when you save a preset.

    Oli

  • How can I remove all hyperlinks in multiple documents at the same time?

    I have about 500 documents that I need to remove links. I know how to do it manually on a basis of doc by doc, but I would do it automatically.

    I have a trial of Adobe Acrobat, but I certainly would purchase if this has been supported.

    Any guidance is appreciated. Thank you.

    What you can try to do is run this JS code in Action:

    this.removeWeblinks ();

  • How can I hear different parts of a room at the same time, I record part in Garageband?

    I'm trying to set up some choral titles and this would be very useful. I read something about surveillance, but I don't know what exactly it does or is used for.

    Monitoring

    I hope I understood your question (?) And I think that I would be right when you say that in GarageBand, you can provide several voice tracks. Adding a new track for each voice 'harmony', you could perfect each track to your heart's content.

    Surveillance is another word for 'playback', and you could listen to each piece individually or simultaneously through your headphones or auxiliary speakers (monitoring). This "muting" tracks that you don't want to hear.

    I've been using the Focusrite interface: integrated unit iTrack Solo , which includes a 'surveillance'. See this link:

    http://us.Focusrite.com/answerbase/using-the-iTrack-solo-with-GarageBand

    But you won't have the iTrack Solo unit. If this is the case, you need GarageBand gurus to make suggestions.

    Have fun

  • How can I have two desktops on iCloud sync at the same time, without having duplicate files?

    Hi all

    I have two computers, a MacBook Pro and iMac. I use the new feature for Sierra macOS, which allows me to continually synchronize my office on iCloud. I welcome the Office on my iMac be synchronized on the cloud. Now, I would have the exact same office on my MacBook Pro. I tried many ways, including by dragging files to iCloud Drive on my desktop, but the synchronization does not work. If I enable syncing on my MacBook Pro, I know that I have duplicate files.

    With this method, I would like to: whenever I have add a file on my desktop iMac computer, it shows up on my MacBook Pro Office without the need for me to keep about iCloud road opening.

    Thanks for reading this.

    Ethan

    If you enable sync on the MacBook Pro, it should not be duplicates.  What makes you think it?

  • I am a customer of Qwest and they changed all my "Hotmail" email and I do not. How can I go back to msn mail. At the same time, I would also uninstall instant messenger.

    I am a customer of the West and they changed my "Hotmail" email  I like the way he was with msn.  At the same time, I also want to disable or uninstall Instant Messaging on my computer.  I'm "Dell Dimension 2400 Series with windows XP"

    Hi ARMELDEDEHOUANOU,
     
    -Are you talking to disabling Windows Live Messenger?
     
    Your email account cannot be changed by Qwest. MSN e-mail account is the same as the Hotmail account.
     
    If you have problems with Hotmail, post your request in the Forums of Hotmail for assistance on this issue.
     
    If you are referring to Windows Live Messenger, follow the steps in the link below to uninstall the same.
  • Hello everyone! I need an application where I can hand write or type and draw, all in the same...

    Hello everyone! I need an application where I can hand write or type and draw, all on the same page,.

    I'm taking courses in biology and chemistry and sometimes I need to draw and explain

    Can someone help me?

    Thank you!

    I need an application where I can hand write or type and draw, all on the same page, I'm taking courses in biology and chemistry and sometimes I need to draw and explain

    @manuelito.castro,.

    Discover the "Mobilenoter" application, that includes the possibility of ink in free form. If you need to be able to classify and organize your writings, Mobilnoter works perfectly with a single Note.

    -Doc

  • How to display on my screen 2 different applications at the same time?

    How to display on my screen 2 different applications at the same time?

    Hello

    The best place to ask would be the forums for answers corresponding to your version of Windows.

    Answers - Windows Forums
    http://answers.Microsoft.com/en-us/Windows

    =====================

    If you have Windows 7 with Aero - click with the right button on the taskbar at the bottom of the screen and click on 'show windows '.
    Side by Side.

    For all versions of Windows:

    You could also reduce less than full screen using the small box to the left of the red X at the top right
    and then resizing windows as you want.

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • How to synchronize an exhibition of over 100 photos at the same time?

    How to synchronize an exhibition of over 100 photos at the same time?

    Hi Stephens,

    Please see the following article for the purposes of setting through multiple images: develop module in Photoshop Lightroom options

    Let me know if it helps.

    Kind regards

    Tanuj

  • How to apply a master page to several documents at the same time?

    How to apply a master page to several documents at the same time?

    > The format of the page master is get imported, but the first page of all documents still remain with the format of page master default 'right '.

    AMP?

    Some content is unique to the first page mapped on master page first in the table to:
    View > reference Pages... MasterPageMaps

    That page and table do not exist by default, incidentally.

    and you make a:

    Format > Page layout > apply Master Pages

    After doing the import?

  • How can I disable groups of tabs? It requires the same tabs to reopen at the next session

    I upgraded to 6.0.1 and experimented with tab groups. Now I can not turn off. It seems to force the same tabs open with the next session. I had (and still have) the warn me when I close the multiple tabs. She replaces this option if I click on the window is closed. Just, it closes the window of firefox and will reopen all the tabs with the next session. This cancels the best feature that firefox has more chrome.

    Please help me to recover my old Firefox...

    Okay, it's stupid, but simple. Go to tools > Options > general. then in the options switch box to "show my windows and tabs from last time" to "show my home page". I entirely agree that tabgroups are pretty useless and the fact that there are already speaks volumes on their apparent worth questions upward around the Mozilla forums, but also the YAnswers about disabling, or its absence.

  • How to run this script on all my hosts at the same time?

    Greetings.  I have this script that tells me that the status of the HBA device path (dead, active).  But it takes forever to run on all my guests, as it does every one host at a time.

    How can I get that it is running on all hosts at the same time?

    Use: Get-HBAPathStatus VMHosts *.

    Thank you!

    Function Get-HBAPathStatus ($InputVMHost) {}
    $vmhosts = get-VMHost $InputVMHost | Name sort

    {foreach ($vmhost to $vmhosts)
    Write-Host "* $vmhost."
    Write-Host "Please wait...". Checking the paths... »
    $hbas = get-VMHostHba - VMhost $vmhost
    $pathStatus = $true
    {foreach ($hba to $hbas)
    $scsiluns = get-ScsiLun - Hba $hba
    {foreach ($scsilun to $scsiluns)
    If ($scsilun - not $null) {}
    $paths = get-ScsiLunPath - ScsiLun $scsilun
    {foreach ($path in $paths)
    Write-Host - NoNewline ". »
    if($Path.) State - eq 'Dead') {}
    $pathStatus = $false
    }
    }
    }
    }
    }
    {if ($pathStatus)}
    Write-Host "
    Write-Host "$vmhost is ok" - ForegroundColor "green".
    }
    else {}
    Write-Host "
    Write-Host "$vmhost death paths." - ForegroundColor 'red '.
    }
    }
    }

    Be sure to use the 32-bit version of PowerShell and PowerCLI with the Start-Job cmdlet.

    Labour will fail with the 64-bit version.

    See the thread disable asynchronous paths for more information.

Maybe you are looking for