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 8441547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:35:19+00:00 2026-06-10T08:35:19+00:00

I have the following callback: ExternalInterface.addCallback(wasCalledFromJS, callFromJavaScript); which is implemented like this: public function

  • 0

I have the following callback:

ExternalInterface.addCallback("wasCalledFromJS", callFromJavaScript);

which is implemented like this:

    public function callFromJavaScript(dir:String):void {
    try {
        scriptName = dir.toString();
    } catch (e:*) {
        Alert.show(e.toString());
    }
}

However, when I try to call it from the JS console, in the following way ( with the method defined in How to call flash actionscript callback method from javascript? ):

>>> thisMovie("Flex4TextArea1").wasCalledFromJS("1")

"Error in Actionscript. Use a try/catch block to find error."

It appears as if the code if not even reaching my try/catch block. Can you spot what I’m doing wrong?

EDIT: After adding Security.allowDomain("*"); it works. Why am I required to do this, even when testing on localhost? It is the same domain, is it not?

  • 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-06-10T08:35:21+00:00Added an answer on June 10, 2026 at 8:35 am

    Error was caused because domain priviledges were not set.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code, in which Boost.Local uses a function callback to load
I have the following code: initialize: function() { _.bindAll(this); var callBack = function(res) {
I have the following jquery: jQuery.fn.slideFadeToggle = function(speed, easing, callback) { return this.animate({ opacity:
Eg. I have following delegate method I want to use as a callback function
Suppose I have the following code function myFunction(param, callback) { ... if (err) {
I have the following code snippet function receiver(callback) { console.log( callback ); } function
I have the following function trying to create a callback InstanceContext from metadata of
I have the following function : var appendStructure = { init : function(wrapper,structure,cls,callback) {
I have the following: $(document).ready(function(){ // bind 'myForm' and provide a simple callback function
I have the following utility: class Worker { public void DoWorkAsync(Action callback) { Action

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.