Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6680667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:30:07+00:00 2026-05-26T04:30:07+00:00

This is very basic and there are samples out there, but I am still

  • 0

This is very basic and there are samples out there, but I am still struggling.

I need to fire an alert with a yes/no option.
I need to do this in actionscript.

Alert.show("Open new tab to search in Google Maps?",
"No places found", Alert.YES | Alert.NO, this, alertListener, null, Alert.NO);

function alertListener(eventObj:CloseEvent):void {

   if (eventObj.detail==Alert.YES) {
    Alert.show("You clicked yes"); 
    }
}

This returns an exception with the flash debug player:

TypeError: Error #1034: Type Coercion failed: cannot convert mx.rpc::AsyncResponder@e31c601 to flash.display.Sprite.
    at Function/ExampleCustomTools.Locator:locator/private:doFind/ExampleCustomTools.Locator:onResult()[C:\Users\sjackson\Adobe Flash Builder 4\DekhoSimulator_Profiler\src\ExampleCustomTools\Locator\locator.mxml:142]
    at mx.rpc::AsyncResponder/result()[E:\dev\hero_private_beta\frameworks\projects\rpc\src\mx\rpc\AsyncResponder.as:95]
    at com.esri.ags.tasks::Locator/handleAddressCandidates()[C:\checkout\flex_api2\api\src\com\esri\ags\tasks\Locator.as:187]
    at Function/http://adobe.com/AS3/2006/builtin::call()
    at com.esri.ags.tasks::BaseTask/handleResult()[C:\checkout\flex_api2\api\src\com\esri\ags\tasks\BaseTask.as:667]
    at Function/com.esri.ags.tasks:BaseTask/esri_internal:sendURLVariables2/com.esri.ags.tasks:result()[C:\checkout\flex_api2\api\src\com\esri\ags\tasks\BaseTask.as:604]
    at mx.rpc::Responder/result()[E:\dev\hero_private_beta\frameworks\projects\rpc\src\mx\rpc\Responder.as:56]
    at mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyResult()[E:\dev\hero_private_beta\frameworks\projects\rpc\src\mx\rpc\AsyncToken.as:239]
    at mx.rpc.events::ResultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()[E:\dev\hero_private_beta\frameworks\projects\rpc\src\mx\rpc\events\ResultEvent.as:207]
    at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\hero_private_beta\frameworks\projects\rpc\src\mx\rpc\http\HTTPService.as:991]
    at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\hero_private_beta\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:318]
    at mx.rpc::Responder/result()[E:\dev\hero_private_beta\frameworks\projects\rpc\src\mx\rpc\Responder.as:56]
    at mx.rpc::AsyncRequest/acknowledge()[E:\dev\hero_private_beta\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:84]
    at DirectHTTPMessageResponder/completeHandler()[E:\dev\hero_private_beta\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:451]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

I have tried several variations of the code, but still get errors.
Apologies for such a trivial Q, but appreciate any help on pointing out whats wrong and the most elegant way of doing this.

Here is the code in its fuller context at pastebin (line 31).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:30:08+00:00Added an answer on May 26, 2026 at 4:30 am

    I should have persevered on my own a bit more.
    Code fix below:

    Alert.show("Open new tab to search in Google Maps?", "No places found", Alert.YES | Alert.NO, null, alertListener, null, Alert.NO);
    
                             function alertListener(eventObj:CloseEvent):void {
                                 // Check to see if the OK button was pressed.
                                 if (eventObj.detail==Alert.YES) {
                                     Alert.show("here"); 
                                 }
                             }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I realise this is very basic but i need a quick way of referencing
I think this is very basic, but still, I didn't understand what I should
This is very basic stuff , but here goes. I find that I am
This is very basic question from programming point of view but as I am
This seems very basic and I must be missing something, but here goes anyways...
This is a very basic question...quite embarassing, but here goes: I have a Stopwatch
I know this maybe a very basic question but I'm having a bit of
This probably is a very very basic question but i can't seem to find
I guess this is very basic but since I'm learning .NET by myself, I
I'm sure this is something very basic but I can't seem to find my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.