ExternalInterface.call("saveglobalscore",score) () throws ScriptTimeoutError, which may not be intercepted

Hello

In my flex code, I invoke ExternalInterface.call("saveglobalscore",score) () to call a function in c ++. In this feature of c ++, a modal dialog box will appear. If this modal dialog box is open for a long time, a warning dialog box saying that a function has executed more than 15 seconds. I wanted to capture this error (which should be ScriptTimeoutError) to suppress this warning dialog box. But I failed.


In the following code, flex timeout warning dialog will show, do not show my words:

Try
{
ExternalInterface.call("saveglobalscore",score) ("popUpModalDialog");
} catch(e:Error)
{
Alert.Show ("Please don't show dialogue timeout");
}


But if I change the code a bit more, flex timeout warning dialog will not appear, my words will show:

Try
{
While (true) {}
} catch(e:Error)
{
Alert.Show ("Please don't show dialogue timeout");
}


The examples show that ExternalInterface. () Call throws an error that cannot be intercepted.
Is there a way I can suppress this warning dialog?

Thank you!

Hello

In my flex code, I invoke ExternalInterface.call("saveglobalscore",score) () to call a function in c ++. In this feature of c ++, a modal dialog box will appear. If this modal dialog box is open for a long time, a warning dialog box saying that a function has executed more than 15 seconds. I wanted to capture this error (which should be ScriptTimeoutError) to suppress this warning dialog box. But I failed.

In the following code, flex timeout warning dialog will show, do not show my words:

Try
{
ExternalInterface.call("saveglobalscore",score) ("popUpModalDialog");
} catch(e:Error)
{
Alert.Show ("Please don't show dialogue timeout");
}

But if I change the code a bit more, flex timeout warning dialog will not appear, my words will show:

Try
{
While (true) {}
} catch(e:Error)
{
Alert.Show ("Please don't show dialogue timeout");
}

The examples show that ExternalInterface. () Call throws an error that cannot be intercepted.
Is there a way I can suppress this warning dialog?

Thank you!

Tags: Flex

Similar Questions

  • Problem with AS3 & quot; ExternalInterface.call("saveglobalscore",score) & quot; in Internet Explorer

    Hello

    Explain how the page is set up:

    I have a HTML page with 2 different movies Flash AS3.

    The first flash movie is the main entertainment and is located in the middle of the screen with a large background image defined in the body of the HTML.

    The second flash movie spans 100% width/height of the size of the screen and acts as a black fade > invisible.

    What I'm doing:

    Once the second Flash animation has gone from black to invisible it calls a JavaScript function on the HTML page to hide the div element, the second flash movie is integrate in (it's like the first flash movie displays a set of input boxes, which the user must be able to type-which will not be able to click on if there is another flash animation that just overlap the first film).

    My initial solution:

    In the second Flash movie is the following code:

    ////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////
    Stop();

    This will load the API needed to communicate with external entities
    to import flash.external.ExternalInterface;

    call the JavaScript function
    ExternalInterface.call("saveglobalscore",score) ('myJavaScriptFunction');
    ////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////

    .. .and it works fine in Mozilla Firefox/Safari. The actionscript code successfully the JavaScript function in the HTML page and this JavaScript function simply calls (to this poster from the scene an alert() message to show that it has been called successfully).

    Problem with IE:

    But, at the time when I try this in Internet Explorer, I get an alert() message but a JavaScript error message that says:

    ////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////
    Code: Select all
    Line: 1
    Char: 106
    Error: 'null' is null or not an object
    Code: 0
    ////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////

    As you would expect I am totally confused as to what could be the problem.

    It's really urgent because it is a living project which must be completed immediately, any help you might have would be greatly appreciated!

    Kind regards

    Select this option.

    GWD salvation,

    Who did it! :)

    I applied the attribute id = "fTrans" to the tag and IE worked well.

    I disparage me my brain one, thank you very much!

    Kind regards
    Mark

  • ExternalInterface.call("saveglobalscore",score) on several areas?

    I use ExternalInterface.call("saveglobalscore",score) in a SWF to call a JavaScript in the html container. The swf file is located in one field other than the html container. Everything works very well if all the files are in the same root directory, but as soon as I make reference to the swf file that is located in the other domain, the call is not working! What Miss me?

    SWF file has this frame 1:
    to import flash.external.ExternalInterface;
    function clickListener(eventObj:Object):Void {}
    ExternalInterface.call("saveglobalscore",score) ("sendToResponseForm");
    }

    SWF file has this on mc as a button instance:
    {We (Press)}
    clickListener();
    }

    HTML/container file that is in the < head > tag:
    < script type = "text/javascript" >
    function sendToResponseForm() {}
    Window.Location = "my.other.html.file";
    }
    < /script >

    HTML file has this integrated:
    < object classid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase =" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6, 0,29,0 ' width ="700"height ="550">" "
    "" < param name = "movie" value = " http://www.otherdomain.com/vid/my.SWFFile.swf" / >
    < param name = "quality" value = "high" / >
    "" "" < embed src = " http://www.otherdomain.com/vid/my.SWFFile.swf" quality = "high" pluginspage = " http://www.macromedia.com/go/getflashplayer ' type =" application/x-shockwave-flash"width ="700"height ="550"> < / embed >
    < / object >

    If all goes well, that's enough for you to chew. As I was saying that if swf and html are in the same domain, it works. As soon as I point to the second area of source of swf file it stops working.

    Thank you
    Demont

    Here is my error: the swf file has been very good and actually worked in IE6/IE7 but doesn't work in Firefox. The process to include the swf file in the HTML code has been vitiated. I originally published the HTML using Dreamweaver to write the in the code. Which fixes the problem, it's that I published the swf using the Flash file in a folder of the office that produced a javascript (AC_RunActiveContent.js), the swf file and HTML file. Javascript code dynamically determined Explorer who was used and which plugin player was necessary. The script loads/writes in the end the appropriate environmental content and any embed or object of the swf file is successfully. He had nothing to with Lacrosse communication area at all.

    The main challenge was last updated the HTML/Javascript Flash to use the appropriate resource, swf, which was located on a different server and move the js file in the appropriate directory, update the link in the HTML accordingly. My only concern was the more general source external javascript. But, at least I'm not concerned with the question of whether it works or not.

    Hope this helps someone.

    Demont

  • ExternalInterface.call("saveglobalscore",score)

    This does not work what is the wrong in this code.

    If I trace (urlPath) showing - null.

    var urlPath = ExternalInterface.call("window.location.href.toString");
    
    if(urlPath != "http://www.domainname.com/demo/test/welcome.swf")
    {
              trace("Yes");
              pageMsg.text = "this is html"
      
    }
    else
    {
              trace("no");
              pageMsg.text = "This is swf"
    }
    
    

    I tested this code html of the page and it works fine.  I created a test document if you want to check.  Click on the green rectangle so that the url displayed...

    http://www.nedwebs.com/Flash/welcome.html

    The swf file contains an mc button named "btn" and a textfield named "url".  The code in the swf file is as follows...

    btn.addEventListener (MouseEvent.CLICK, traceURL);

    function traceURL(evt:MouseEvent):void {}
    var urlPath = ExternalInterface.call("saveglobalscore",score) ("windowhref");
    URL. Text = urlPath;
    }

    You should test it on a server by using the html page, if you don't already have it.

  • Flex 3: need help with ExternalInterface.call("saveglobalscore",score)

    Hello

    I have my setting up a Flex project in my Flex Builder.

    I am going through my step by step to understand.

    In our project, we got this call:

    public function callDataOfJSMethod (): void
    {
    ExternalInterface.call("saveglobalscore",score) ("getData");
    }

    But I was not this getData anywhere, couldn't you please let me know what it could be and where I can find that?

    Thanks in advance.

    It should be a javascript method in the html wrapper.

  • The parameter ExternalInterface.call("saveglobalscore",score) String length limit?

    Is there a limit on the length of string to the amount of characters from a string can contain when it is passed as a parameter to ExternalInterface.call("saveglobalscore",score) ()?

    Also, there are characters that ExternalInterface.call("saveglobalscore",score) () cannot serialize to a string? As \n, \t... etc.

    The livedocs don't answer these questions.

    Thanks for your reply, but I just thought of it.

    ExternalInterface.call("saveglobalscore",score) ("jsFunc", longString);

    There seems to be no limit tank that I fell on the cause I could push 2K in there.

    The problem is the line breaks in the string, they must be stripped during serialization. Just make sure that you clean the string of new line as follows:

    longString = longString.split ("\r") .split ("\n").join("").join("");
    ExternalInterface.call("saveglobalscore",score) ("jsFunc", longString);

    works very well...

  • ExternalInterface.call("saveglobalscore",score) () error with Flash Player 10

    I don't know what that means. The function runs successfully in javascript, and I evaluate ExternalInterface.available...

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at flash.external::ExternalInterface$/_callIn()
    < anonymous >)
    at flash.external::ExternalInterface$/_evalJS()
    at flash.external::ExternalInterface$/call()
    at views.audio::myObject/myFunction()

    UPDATE: it was JS calling a reminder the null value.

  • New path before calling ExternalInterface.call("saveglobalscore",score))

    When click on a component button (called btn_Connect here),
    I want to display a message in a label (lbl_Status here)
    before calling a long-term fscommand() function.

    But there is no action until the fscommand() is completed.

    How can I do?

    Thank you
    Joseph

    Part of my ActionScript code is below.
    My flash application has only a single image.

    To redraw the flash and deal with other possible user interface events,.
    I changed my c# code so that the long task can run in a separate thread.

    Now, everything works fine as I had hoped.

    Joseph

  • condition on field which may not exist

    Hello

    There is a report that contains the records of transactions and receipts. The entry is from different custom folders, and it is possible that there are details of a transaction, but no details from a reception in a line because there is no receipt.

    An I am to set the new leaves should have a condition that the leaf only include rows where revenue was last updated OR the update of the transaction is equal to what is given in the parameter.

    Problem: I get an error of illegal use of conditions and calculations that cannot be resolved in the query. If I set a condition that the update of revenue is equal to the parameter AND ANOTHER condition for update operations, there is no problem. As soon as I combine the two in a State (I have finally to do because I need the OR statement), I get an error.

    My gut feeling is that because there is not always an acknowledgment (or sometimes there is a reception with no transaction), the condition cannot be resolved.

    If it is, in fact, the case, is it possible that I can get around this? They are not so eager to have two sheets separate (one for the update of the transaction) and a separate one for the update of revenue.

    Thank you.
    Leah

    The user requests another sheet where I am to display all records where the transaction does not have a reception applied. I'm running into the same problem where I can not get the results I want from a folder that does not exist. Line by line, I get 0 in a field of amount calculated using the NVL function if there is no reception in the row in the report, but if I set a condition on this basis, the report is not correct. Can someone help me on this?

    Published by: user476771 on October 11, 2010 04:49

    In case anyone follows this thread...
    This last problem, I simply resolved. I had used the NVL on the ground (detail), but the report is the SUM of the field. When I changed the function NVL on the SUM of the field (i.e., the field in the report itself), it worked.

    Now, I'll try to review the other sheet with the last updated field transactions and revenues.
    Thanks to all who watched this last problem.
    Leah

    Published by: user476771 on October 11, 2010 05:15

    Hi LEA
    It sounds as if there is an outer join defined between the operations and received files, which would be quite normal.

    However, the problem here is that SQL, no discoverer, does not allow the use of a statement of GOLD when an Outer join is used. You can also create CONDITIONS when a RC is in use. The error is ORA-01719

    Have a look here: http://techonthenet.com/oracle/errors/ora01719.php

    This link also gives you an indication on how to solve your problem, in that you have to use a UNION query that will overcome the use of outer join. You can use it in a view or a custom folder.

    Hope this helps
    Best wishes
    Michael

  • ExternalInterface call the Javascript to AS2 array throwing error undefined

    I need to pass various (follow-up) IDs to a .swf.  the IDS are in a table like this =

    < script type = "text/javascript" >

    function getImpID() {}

    var medID = {impID: pvID '12345': ' 677890', exID: '654332'};

    return medID;

    };

    function thisMovie (banner) {}

    If (navigator.appName.indexOf ("Microsoft")! = - 1) {}

    Returns the window [banner]

    }

    else {}

    return the document [banner]

    }

    }

    Window.OnLoad = getImpID;

    < /script >

    For now, the AS2 I is:

    flash.external import. *;

    System.security.allowDomain (sourceDomain)

    var allID:String = ExternalInterface.call.apply ("getImpID");

    function getIDs() {}

    var impID:Number;

    var pvID:Number;

    var exID:Number;

    var id_arr:Array = allID.split(",");

    _root.id_test. Text = impID;

    }

    getIDs();

    Basically, what I need is to divide the three identifiers from the javascript so that I can add with different URL clickTags in the will.  I primarily the "undefined" error, so I'm going out on a limb here I have the AS2 does nothing now value.  More big scratcher head for me is, if I have the ID in an array in javascript (medID) how do I get them not only correctly in Flash, but separate them in their separate identity papers.

    Any suggestions would be greatly appreciated.

    Thank you!

    I forgot to answer, your tips have helped solve the puzzle =

    ActionScript:

    function idTag() {}

    getID = Object (ExternalInterface.call("saveglobalscore",score) ("getImpID"));

    getID.toString ();

    _root.id_test. Text = getID;

    }

    idTag();

    JavaScript

    has worked like a charm!

  • ExternalInterface call in Javascript popup

    I am incorporating a swf in a pop up window using the javascript window.open function. I am currently passing through static values for the height and the width corresponds to the height and width of the embedded swf file of the popup.  A user can click a button in the swf file, and it changes the size of the SWF to 400 x 300, at 800 x 600.  In flex, I use ExternalInterface.call("saveglobalscore",score) ("resize"); but nothing happens.  I'm a complete noob with javascript, is not how to use the ExternalInterface API?  Any ideas why it does not work?  Is there an easier way to get the same functionality to work with something else?  The JavaScript code is below, tons of thanks in advance to tide me over.

    < SCRIPT TYPE = "text/javascript" >

    <!--

    popup function (mylink, windowname)

    {

    If (! window.focus) return true;

    var href;

    If (typeof (mylink) is 'chain')

    href = mylink;

    on the other

    href = myLink.href;

    Popup = window.open (href, windowname, 'width = 400, height = 300, scrollbars = no, resizable = 1');

    Returns false;

    }

    function resize()
    {
    popup.resizeTo (800, 600);
    }


    ->

    < /script >

    < body >

    " < a HREF =" http://localhost/main.swf "onClick ="return popup (this, 'notes')"> "

    App

    < /A >

    Here is the sample,

    Sample.MXML

    
    http://www.adobe.com/2006/mxml"
         layout="absolute"
         width="100%" height="100%">
         
              
         
         
    
    

    Parent html

    
         
              Resize Demo
              
         
         
              
         
    
    

    Child html (Popup.html)

    
         
              Resize - Popup
              
         
         
              
                   
                   
              
         
    
    
  • There is NO selection update software on my phone! How are Iphone 3 # IOS updated? It may not be this difficult OR the answer is "It cannot be upgraded" - which is?

    There is NO selection update software on my phone! How are Iphone 3 # IOS updated?

    It may not be this difficult OR the answer is "It cannot be upgraded" - which is?

    The model number you have listed is an iPhone 4, which can be upgraded to iOS 7.1.2. To have the option to update software on the phone, you need at least iOS 5, otherwise you will need to use iTunes on your computer sync to perform the upgrade.

  • Click right does not work with Firefox, which may be the problem is Firefox or my computer?

    Click right does not work with Firefox, which may be the problem is Firefox or my computer?

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • I received a note indicating that my MAC might be infected by a virus and she said to call a 1-866 number, which was the support Apple... is this true or a scam

    I received a note indicating that my MAC might be infected by a virus and she said to call a 1-866 number, which was the support Apple... is this true or a scam

    It's a scam

    Whatever you do, do not call this number

  • Fake phone call from microsoft about an error report which does not send

    a phone call on my landline today which is active for 2 weeks of the gentleman called Sam Parker claiming that it was Microsoft. He said that my computer was going slowly and that an error report had them alerted to the fact that certain safety ripped on my computer? There therefore eft with unfamiliar programs on here etc etc. Me being the shocking type said I saw the error message but not him hadn't sent because it crashed me the kick-off of the system. He didn't want to log on and it me by happen then to the technical team who could advise me where they were and I could remove them. All this happened yesterday, or the day before that I don't remember. I told him I wasn't going to do this as it could be anyone and asked for a phone number to call later today on. He gave me the number, but when I tried to ring it says wrong number and if I use the reminder it bleeps just like the engaged tone. Ayone can tell me if he's a jerk or real please? Thank you very much

    For more information on this type of scam, see the following:

    http://social.answers.Microsoft.com/forums/en-us/w7security/thread/e5576f0a-827e-4fc0-a4b1-707add212065

Maybe you are looking for