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.

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

    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.

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

  • Need help with ExternalInterface.addCallback("IsStatic",IsStatic))

    The simple code below returns this error: "1067: Implicit coercion of a value of type String to a type unrelated function." when it is compiled in strict mode.

    It seems so simple. What I'm missing here?

    Thank you.

    Problem solved as soon as I turned into a normal function.

  • 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

  • Need help with ExternalInteface

    Hey,.

    I have worked on this all day and can not get the ExternalInterface.call("saveglobalscore",score) work at all! I did everything and cannot understand it. It should work, but it is not in any browser and makes no sense.

    My last attempt was to test to see if ExternalInterface is active and in the runtime flash is, but when I run the SWF from a HTML page is not. I have no idea why it does not work.

    I would appreciate help!

    AS3 Code: on the first frame of the swf 1 frame. displayTXT is sitting on the stage of the textbox. If I run this flash, the text box says "available". Also, if I run the present of an HTML page, the text box says "available". However, the javaFunction still is not called from Flash.

    
    
    import flash.external.ExternalInterface;
    
    var isAvailable:Boolean = ExternalInterface.available;
    
    if (isAvailable)
    {
         displayTXT.text = "Available";
         ExternalInterface.call("javaFunction");
    }
    else
    {
         displayTXT.text = "Not Available";
    }
    
    

    HTML code:

    <!-- saved from url=(0013)about:internet -->
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>jTest</title>
    </head>
    <body bgcolor="#ffffff">
    <script language="JavaScript">
    <!--
    var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
    // Handle all the FSCommand messages in a Flash movie.
    function jTest_DoFSCommand(command, args) {
         var jTestObj = isInternetExplorer ? document.all.jTest : document.jTest;
         //
         // Place your code here.
         //
    }
    // Hook for Internet Explorer.
    if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
         document.write('<script language=\"VBScript\"\>\n');
         document.write('On Error Resume Next\n');
         document.write('Sub jTest_FSCommand(ByVal command, ByVal args)\n');
         document.write('     Call jTest_DoFSCommand(command, args)\n');
         document.write('End Sub\n');
         document.write('</script\>\n');
    }
    
    function javaFunction(){
         alert("Test");
    }
    //-->
    </script>
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" id="jTest" width="550" height="400" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="jTest.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="jTest.swf" quality="high" bgcolor="#ffffff" width="550" height="400" swLiveConnect=true id="jTest" name="jTest" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
    </object>
    </body>
    </html>
    

    If you try to run this code via clicking on the html code, it will fail because of security access. You will need to run the files from a Web server or to add an exception for the flashplayer global parameters http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.htm l the later is a pain in the end to do manually running a local Web server may be ideal.

    If you have access to one or know a lot about their implementation in place you can get WAMP or MAMP, web development solutions contained almost free.

    http://www.wampserver.com/en/

    http://www.MAMP.info/en/index.html

    T

  • I need help with an installation failure to interpret and troubleshoot a Setup log.

    Background: A few years ago, many editors of cinema used Final Cut Pro 6 (also contained in Final Cut Studio 2) for their editing projects.  Shared Apple Final Cut X uses a different format that is not compatible with FCP6.  Sometimes, these editors are called to work on a few historical projects that have been published in FCP6 and need this version to run now.

    Starting with OS X Lion, FCP6 would install not in Lion and thereafter.

    According research by Jeremy Johnston as noted on his blog, he discovered that Apple has inserted a file in the folder CoreServices in the Library folder of the system folder that causes versions the version Final Cut Pro X (and other older Apple programs in the same situation) do not settle.  He suggested changes to this file that would seek to prevent interfering with the installation of FCP6 in Lion, many users of final cut PRO 6 were successful in their efforts to install in Lion and work with it.

    Later in a discussion update on installing FCP6 in Mavericks, HawaiianHippie determined that the simplest way to perform the installation of FCP6 was simply copy this file and remove it from the system folder, install FCP6 and then restore the copied file:

    https://discussions.Apple.com/message/26309669#26309669

    I used this method with success to install FCS2 in Yosemite:

    [click on images to enlarge]

    However, in my attempts to install FCS2 in El Capitan, it fails in the last 5% to install the first DVD:

    First of all, I need advice on how to display an extremely large Setup log in this thread (on MacRumors, it is a method to insert a 'code' in a small box that can be the object of a scrollbar if necessary to read all along).  I am unable to find such a method to post here.

    Then once approved, I need help to determine which component is causing the installation to fail and perhaps this element can be omitted from the installation:

    If this element is not required, then maybe FCP6 can be installed successfully without it.  And if that omitted element is necessary, perhaps a manual method to install it can be determined by pacifists.

    It is my goal to help those who need to install and use FCP6 on their new Macs running El Capitan.

    Here is the post on MacRumors with pre-installed Setup log:

    http://forums.MacRumors.com/threads/i-need-help-with-an-installation-failure-to-interpret-and-troubleshoot-an-Installer-log.1954786/#post-22541389

  • How can I get ahold of a LIVE person? I need HELP with my email account (Email removed for privacy), you can contact me at Email removed for privacy or * withdrawn * please someone HELP! Mike Golab

    How can I get ahold of a LIVE person? I need HELP with my email account (* address email is removed from the privacy *) you can contact me to the * address email is removed from the privacy * or * remove * please someone HELP! Mike Golab

    E-mail address is removed from the privacy *.

    No, and that has nothing to do with this old thread. This is a scam that last for years. Microsoft never does unsolicited phone calls.
     
     
     
     
     

    Scams by e-mail or web: how to protect yourself
    http://www.Microsoft.com/security/online-privacy/phishing-scams.aspx
     
     
     
     

    Aggressive, persistent Windows tech support fraudsters continue to track consumers
    http://www.Computerworld.com/s/article/9248122/Aggressive_persistent_Windows_tech_support_scammers_continue_to_stalk_consumers
     
     
  • Need help with SQL/PL/SQL for Dates

    Hi Experts - need help with a SQL query.

    I need to insert some date fields in a table called CALENDAR_PERIOD.

    Current data in CALENDAR_PERIOD table with their data types:

    STARTPERIOD (DATE) YEAR (NUMBER) PERIOD_LABEL (Varchar2 255)

    02/11/2014 2014 2014/02/11 SUN

    03/11/2014 2014 14/03/11 MON

    04/11/2014 2014 11/04/14 MAR

    I have to increment above values up to the year 2025. I don't know how to write SQL and increment of these values.

    Ex: My next value should insert: 05/11/2015 2014 11/05/14 WED like that I need to insert data until 12 31, 2025.

    Can you please help me with PL/SQL block?

    Really appreciate your help!

    DB version:

    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    PL/SQL Release 11.2.0.3.0 - Production

    CORE Production 11.2.0.3.0

    AMT for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production

    NLSRTL Version 11.2.0.3.0 - Production

    Thank you
    Sandy

    Hello Sandy,

    Maybe something like

    INSERT INTO calendar_period (startperiod, year, period_label)

    SELECT DATE '' 2014-11-04 + LEVEL

    , TO_NUMBER (TO_CHAR (DATE '' 2014-11-04 + LEVEL, "YYYY"))

    , TO_CHAR (DATE '' 2014-11-04 + LEVEL, "MM/DD/YY DY")

    OF the double

    CONNECT BY LEVEL<= date="" '2025-12-314="" -="" date="">

    ;

    ((mais je ne comprends pas pourquoi nous créons une telle table "année" et "period_label" peuvent être calculé à partir de startperiod))

    Best regards

    Bruno Vroman.

  • Hello need help with the opacity mask.

    Hello need help with the opacity mask. I hope someone out there can help

    I inherited a logo that appears to use a Logo of OM has a shape with a grad. This grad at first sight is not used in the Grad scheme and there is not editable.  Looking at the transparency palette I find an OM (pic1) output option. If I choose what the grad on separates it from the page of the form, that is from there I can change/remove as required (Note2).

    However, sometimes (he did no change), I'll be back to the same original form and output option is grayed out and is no longer available. Or I go to the similar shape that has the same treatment and I can't go out OM (pic3)

    The only difference is the thumbnail in the transparency palette, which is strong in pic1 and rated on pic3. What Miss me?    I'm not clear what the advantage is simply OM using the Grad palette to apply a grad in my form, but until I can get rid of OM who is there, I can't comfortably apply to the grad I want.

    The white gradient LHS I have no problem with. I choose fortunately only and each time get the possibility of release of OM.

    Screen Shot 2015-08-06 at 12.26.48.pngScreen Shot 2015-08-06 at 12.00.10.pngScreen Shot 2015-08-06 at 12.01.16.png

    The other thing weird. When I select the white gradient. Sometimes, the exit option is in the palette without going through the drop-down list (Fig 4).

    Other times seems not that OM has already been applied, because the palette gives me the ability to mask rather than liberation (5 photos). Until I go to the drop down and then I find Release is an option after all.

    What is the difference here?   Not much of a problem, because either way I can release OM to be able to change the grad.

    The file is passed through several hands and play anywhere to try to resolve issues, and many stops and save slot, so something along the line was of course done a logo and not the other because of the difference, but I can't for the life of me see what that.

    Screen Shot 2015-08-06 at 12.44.21.pngScreen Shot 2015-08-06 at 12.44.36.png

    I hope someone can help. Very appreciated


    See you soon

    Dave

    Dave,

    I've (mis) understanding the issues, you can account for the box to the right in the main palette transparency (called thumbnail) here.

    Illustrator help | Transparency and blending modes

    represents the masking objects.

    Some of your screenshots show no object mask, so it only is not really a mask even if do the opacity mask has been clicked and there seems to be one in the layers palette, wherever you look.

    I think that it is perhaps the issue.

  • Making the ear of corn and need help with the ball.

    I do some corn on the COB for an illustration and I need help with the texture of the ball. I've been slowly making progress with gradient for kernels mesh, but I can't seem to recreate the look of the ball at all. I tried to recreate it in a rectangle by using the option in the menu object (1 row, 50 columns) gradient mesh and I'm trying with the fusion in object mode, but not lucky yet. Can someone help to put me on the right track to make the texture:

    http://images.clipartof.com/sweet-corn-on-the-cob-with-husk-royalty-free-vegetable-stock-photo-by-kennygadams-4501068853.jpg

    http://image.shutterstock.com/display_pic_with_logo/660550/660550,1298544740,8/stock-photo-ripe-corn-vector-illustration-on-white-background-71847955.jpg

    http://static5.depositphotos.com/1012047/533/v/950/depositphotos_5336961-Corn-oil.-Stylized-drop-of-oil-and-corn-cob..jpg

    I've been slowly making progress with gradient for kernels mesh, but I can't seem to recreate the look of the ball at all.

    Tank,

    You have published three images stylistically very different. The first is photographic and call probably (but not necessarily) for graduates of mesh. The other two are graphical treatments (and frankly, they're both rather flat; lack of depth).

    Illustration style extends the range of cartoonish in sketchy photo-realism and all the rest. The problem is you didn't show your own attempt so that anyone can have an idea of what you're trying to achieve the stylistic point of view.

    I just need to put in place so that the final step does not appear the whole box. The problem now is trying to make the style of the good brush to reproduce the effect...

    You seem to think you have to build a kind of linear construction and then find a way to reshape the shape of each part of the leaf. Yes, you pouvez approach it this way, but Illustrator users has often tend to be what aunt Molly would call "too clever by half."

    Not everything must be something semi intelligent auto or complex and tedious consruct involving brushes, envelopes, masks, etc, etc. Much can be accomplished by thinking that he just thanks to measure you draw directly economic paths and constructions, which take no more time (often less) and result in very tidy, simple files. Again, a lot depends on what you are trying to achieve the stylistic point of view. But here's an example that only took a few minutes to draw:

    If the above consists of:

    Three roads closed, 8 points each, with ordinary linear degrees

    Three mixtures of open path with three anchor points for each key path

    Six paths closed for shadows / highlights, with 19 points in total

    Mixtures being directly from the paths drawn comic forms, the spacing of the veins 'automatically' and intuitively follows the width from point of view of the worksheet.

    Rather than to build a boilerplate brush, colouring and the weight of each of the three main paths of the vein mixtures can be set individually at any time, simply directly by selecting the key path.

    JET

Maybe you are looking for