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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:22:20+00:00 2026-06-07T22:22:20+00:00

I am trying to call a method of a javascript from the actionscript using

  • 0

I am trying to call a method of a javascript from the actionscript using the ExternalInterface.
Here is the code in action script

private function onKickEvent(e:LogoutEvent):void{
                ExternalInterface.call("LoginFound","message");
                return;
        }

And this is my javascript mwthod

function LoginFound(message){
        alert(message);
    anotherInstanceExists=true;

}

Everything is working fine, but the only thing is when act on the alert box which is shown in the javascript after some 20 secs, the exception is thrown from the flash player that a script has been running longer than expected time 15 sec.

How can i avoid this?

  • 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-07T22:22:23+00:00Added an answer on June 7, 2026 at 10:22 pm

    When you call js function from the actionscript, that function have to work and return value not longer than in 15 sec. Javascript works in single thread,and when you call LoginFound function, alert stops farther executions on the thread.

    function LoginFound(message){
        alert('something');
        //Nothing will be executed unless `alert` window will be closed        
    }
    

    However you can handle such situation (the execution,which is longer than 15 sec) in Actionsript by using try/catch:

    private function onKickEvent(e:LogoutEvent):void{
        try{
            ExternalInterface.call("LoginFound","message");
        }catch(e:Error){
            //Do something
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to call javascript method from an Applet using netscapte.java.JSObject . in
i am trying to call a server side button click method from javascript function
I'm trying to call a controller method from a javascript function, I read that
I'm trying to call a C# method from JavaScript by using ActiveXObject : var
I am trying to call a actionscript method from javascript, but it says flashObj.method()
I am trying to call my Javascript method from my java in GWT below
I am trying to call the browse() method of the FileReference class from JavaScript
I'm trying to call a Flash function from javascript passing complex data types as
I'm trying to execute custom JS code from a Firefox extension using: function executeJS(document,
I am trying to call a method from the constructor of my javascript constructor,

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.