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

Tags: Adobe Animate

Similar Questions

  • 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.

  • 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

  • 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)

    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.

  • 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!

  • 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

  • I can't get the video when using firefox. I know it's a problem with firefox because I get video when you use internet explorer or google chrome.

    Plug-ins are updated. I can't understand what is wrong. He started from nothing and I have no other problems.

    Recent crashes of some multimedia content (this includes the Youtube videos, some flash games and other applications), in collaboration with Firefox 14 are probably caused by a recent update of Flash 11.3 and/or Real Player browser plugin to malfunction.

    To resolve this problem, follow the steps in these articles in the Knowledge Base:

    Flash Plugin - maintain and troubleshoot

    Adobe Flash plugin has crashed - avoid that it happen

    11.3 Flash does not load video in Firefox

    We'll find other information on more technical issues under these links:

    http://forums.Adobe.com/thread/1018071?TSTART=0

    http://blogs.Adobe.com/asset/2012/06/inside-Flash-Player-protected-mode-for-Firefox.html

    Please tell us if it helped!

  • anyone having problems with the junk e-mail filter in hotmail or msn Explorer

    anyone having problems with the junk e-mail filter in hotmail or msn Explorer

    Hello

    1. The issue is only with MSN mail?
    2. Have you tried using another web browser and check if you are faced with a similar question?

    Given that the problem is related to MSN I suggest you to contact MSN support for assistance.

    How to contact MSN customer service

    http://support.Microsoft.com/kb/940784

    Check also:

    https://support.MSN.com/default.aspx?&St=1&wfxredirect=1

    http://windowslivehelp.com/product.aspx?ProductID=1

     

    Hope this information is useful.

  • Problem with recording devices and call issues

    Until recently I had a few problems with my microphone on Skype. Whenever I start my PC, everything will be fine, but every time I change the microphone source (from my webcam for stereo mix so I can play sounds in calls) and leave the call, I get weird questions. First if I still have the stereo mix as the source micro fine, but if I change it to my micro webcam when I click on answer call nothing happens and if I call someone it won't fail to connect and it will say: problem with the device registration, which is strange because it has nothing to do with the connection. Also if I change the source to microphone during a call, the call will be disconnected as if I turned on the internet and post something about the sound card errors. Can anyone help?

    I found the problem, clown fish was not working with Skype and it ceased to use the microphone and I thought since I had removed so I don't think that was the problem, but for some reason any, it is been installed, in any case I removed it and now Skype works fine.

  • Problem with the syntax to call a page Apex

    I display 5 faces changing mood of a table. Each face has a link stored in the table. The link should go to a page in the same application and pass a parameter to this page when the face is selected.

    Somewhere, there is a problem with the syntax of the link, can anyone please help me out with the correct syntax, please.

    The error that I get when I select a face, is the following:

    Screenshot (34).png

    The link entry in the table is the following: http://apex.enciva.co.uk/pls/apex/f?p=842:1: & SESSION.: P1_MOODID:1

    and the code to display the faces, is as follows:

    DECLARE

    BEGIN

    FOR (IN) c1

    SELECT Hmauin,

    mntitle, mnlink

    OF MOODYFACES

    WHERE NVL ((mnfilename) dbms_lob.getlength, 0) > 0

    AND mnactive = 'yes '.

    ORDER BY HMAUIN

    ) LOOP

    HTP.prn ("< a class ="dock-item"HREF ="'|) C1. MNLINK | "" ">

    < img src = "f? p = & APP_ID.: & APP_PAGE_ID.: & APP_SESSION.:APPLICATION_PROCESS = GET_IMG1:NO:P141_MNID:' | C1. HMAUIN | "" "alt =" "/ >

    < span > ' | C1.mntitle | / span > < /a > ');

    END LOOP;

    END;

    Any answer will appreciated.

    Thanks fac586, spawn the link works perfectly.

  • Problem with links to another Web page when using the Internet

    I can open any website, but when there is another highlight link to another Web page I get an "Error on Page" message down to the left of the screen when I try to access it. When I point out this message, I get the message "no such interface supported." This is on a HP Pavilion dv 7-3173 nr notebook new. I use Internet Explorer 8 and the operating system is Windows 7 Home Premium.  I have disabled the firewall without success and it occurs either wireless or ethernet connection.  A typical error detailed message is as follows:

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB0.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729 .NET CLR 3.0.30729; Media Center PC 6.0; HPNTDF; OfficeLiveConnector.1.3; OfficeLivePatch.0.0;. NET4.0C; BRI/1)

    Timestamp: Sat, December 2, 2010 17:27:10 UTC

    Message: No such interface took in charge

    Line: 2

    Char: 11896

    Code: 0

    URI: http://www.durabuiltbuildingproducts.com/menumachine/menumachine2.js

    I would appreciate any suggestion or help.

    Hello

    Try to download and install Firefox on the link below and post back if you still have the problem by clicking on the links within Web sites.

    Firefox

    Looking forward to hear from you.

    Best wishes

    DP - K

  • With the help of Acrobat XI - no PDFMaker in Internet Explorer icon

    Why don't the PDFMaker icon doesn't show in Internet Explorer - is - it is not compatible with 64 bit?

    It's probably a problem of compatibility because Acrobat and Reader of 32-bit applications. Have you tried to open the 32-bit version of Internet Explorer to see if the toolbars are there?

  • I can't print properly on the web with a computer with Windows 7 64 gig; printing is fine from Internet Explorer

    My new HP computer with a 64-bit operating system use Windows 7 and internet pages do not print correctly. Printing is very small and parts of the page are SEPARATED. Printing works fine in Internet Explorer.

    This has happened

    Each time Firefox opened

    == I bought the new computer

    See this:
    http://KB.mozillazine.org/Problems_printing_web_pages

Maybe you are looking for