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

Tags: Adobe Animate

Similar Questions

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

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

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

  • EXCEL ActiveX + error '-2146827284' (but not the string length limit)

    Hi all

    First of all thanks for your help!

    I have a strange error with excel activeX: "-2146827284!"

    Why strange? Because my export feature works perfectly on a computer but not on another... (both are windows 7 + Excel 2007)

    How my application works:

    I have to read an excel spreadsheet which preserves made with different types of instruments of measures.

    For each type of instrument, I have to create a specific worksheet with its measures.

    For example:

    1 spreadsheet excel with the many measures of 4 different types of instruments

    SHOULD GIVE

    4 excel spreadsheets containing the measures of each instrument (1 worksheet for a type of instrument).

    Hope I am clear...

    Why I do with LV? Because it's fun!

    Now that some snapshoot.

    1 - where the bug appears :

    2 - the message I get (translated from french to English):

    Additional information:

    -The size of the string I have write in excel cells is 6 characters max. More I put a condition to return an error if the string length is > 900 characters.

    Thanks a lot for your help!

    SO simple...

    It was just the name of the folder...

    I coded the name of the folder as a constant aim dev. And I do not mind that the name of the folder is not the same on both computers!

    "a missing letter = a week closed.

    Arrrgh

    all sorry to bother you

  • 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
              
         
         
              
                   
                   
              
         
    
    
  • Working with table gross typed the parameter of the procedure.

    I have a table defined as


    CREATE TABLE 'JOBS '.
    ("JOB_ID' VARCHAR2 (200 BYTE),
    'FUNCTION' RAW (16).
    NUMBER OF "MIN_SALARY."
    NUMBER OF "MAX_SALARY.
    )



    Defined as package

    create or replace package associative_array as
    type t_job_id is table of index jobs.job_id%type by pls_integer;
    type t_job_title is table of index jobs.job_title%type by pls_integer;
    type t_min_salary is table of index jobs.min_salary%type by pls_integer;
    type t_max_salary is table of index jobs.max_salary%type by pls_integer;

    procedure array_insert (p_job_id in t_job_id,
    p_job_title in t_job_title,
    p_min_salary in t_min_salary,
    p_max_salary to t_max_salary);
    end associative_array;
    /


    create or replace package body associative_array as
    procedure array_insert (p_job_id in t_job_id,
    p_job_title in t_job_title,
    p_min_salary in t_min_salary,
    p_max_salary to t_max_salary) is
    Start
    ForAll i in p_job_id.first... p_job_id. Last
    insert into jobs (job_id,
    function,
    min_salary,
    max_salary)
    values (p_job_id (i),
    p_job_title (i),
    p_min_salary (i),
    p_max_salary (i));
    end array_insert;
    end associative_array;
    /

    The client code is

    String s = "UserID = system; password = system; data source = ORCL; enlist = true; layout common = true ";

    create and open the connection object
    Con OracleConnection = new OracleConnection (constr.);
    con. Open();
    OracleCommand cmd = con. CreateCommand();
    cmd.CommandText = "associative_array.array_insert";
    cmd.CommandType = CommandType.StoredProcedure;

    create objects for each parameter setting
    OracleParameter p_job_id = new OracleParameter();
    OracleParameter p_job_title = new OracleParameter();
    OracleParameter p_min_salary = new OracleParameter();
    OracleParameter p_max_salary = new OracleParameter();

    set the type parameter for each parameter
    p_job_id. OracleDbType is OracleDbType.Varchar2.;
    p_job_title. OracleDbType = OracleDbType.Raw;
    p_min_salary. OracleDbType = OracleDbType.Decimal;
    p_max_salary. OracleDbType = OracleDbType.Decimal;

    Set the type of collection for each parameter
    p_job_id CollectionType in the Group OracleCollectionType.PLSQLAssociativeArray;
    p_job_title. CollectionType = OracleCollectionType.PLSQLAssociativeArray;
    p_min_salary. CollectionType = OracleCollectionType.PLSQLAssociativeArray;
    p_max_salary. CollectionType = OracleCollectionType.PLSQLAssociativeArray;

    Set the parameter values
    p_job_id. value = new string [3] {"IT_DBA", "IT_MAN", "IT_VP"};
    p_job_title. Value = new Guid [1] {Guid.NewGuid ()};
    p_min_salary. Value = new decimal [3] {8000, 12000, 18000};
    p_max_salary. Value = new decimal [3] {16000, 24000, 36000};

    set the size for each table
    p_job_id. size = 3;
    p_job_title. Size = 1;
    p_min_salary. Size = 3;
    p_max_salary. Size = 3;

    p_job_id. ParameterName = "p_job_id";
    p_min_salary. ParameterName = "p_min_salary";
    p_max_salary. ParameterName = "p_max_salary";
    p_job_title. ParameterName = "p_job_title";

    Add parameters to the collection of command objects
    cmd. Parameters.Add (p_job_id);
    cmd. Parameters.Add (p_job_title);
    cmd. Parameters.Add (p_min_salary);
    cmd. Parameters.Add (p_max_salary);

    BindByName. cmd = true;
    run the insert
    cmd ExecuteNonQuery());

    Error occurred during execution of the customer.

    Unhandled exception: System.ArgumentException: invalid parameter binding
    Parameter name: p_job_title
    at Oracle.DataAccess.Client.OracleParameter.GetBindingSize_Raw (Int32 idx)
    at Oracle.DataAccess.Client.OracleParameter.PreBind_Raw)
    to Oracle.DataAccess.Client.OracleParameter.PreBind (OracleConnection conn, IntPtr errCtx, Int32 arraySize)
    at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery)

    But if I change jobs. P_job_title varchar2 and change function. Value and p_job_title. Therefore, any OracleDbType is fine.

    Following me is at fault-
    p_job_title. Value = new Guid [1] {Guid.NewGuid ()};

    Since you have already said-
    p_job_title. OracleDbType = OracleDbType.Raw;

    You must have 'p_job_title. Value' as 'Byte' or 'OracleBinary.

    It will be useful.

  • Change the parameter [] strings in a sub - bound dynamically VI

    I'm in a situation where I need to use the sub-panels to dynamically bind subVIs for data entry. I also like having the calling VI to change the [] parameter strings several enumerations in the Subvi, but this doesn't seem to be possible, as the Subvi is not in edit mode. Does anyone know of a way around this?

    I read data from a file to initialize the enums, so that I can have the Sub - VI read the file instead, but I was hoping to do it once in the main VI and send strings to the subVIs to speed up execution.

    Thank you!

    derekemuff wrote:

    I read data from a file to initialize the enums, so that I can have the Sub - VI read the file instead, but I was hoping to do it once in the main VI and send strings to the subVIs to speed up execution.

    It's impossible.  Enums are set in stone at run time.  Oh wait, you try to use the script running.  Sorry, it does not work.  Note that the property for the [Strings] node for the enum is blue?  That tells you it is a script node and is useful for mounting screws over time edit.

    As RavensFan said, you use a ring.  Their data type is a real number.

  • dbAdapter fails during the call to procedure package oracle object type in the parameter out

    JDeveloper 1.1.1.6

    Oracle 11g

    Existing package procedure is defined with the table of objects in input parameters and.

    Package myPackage

    procedure processRecon (numero_projet VARCHAR2,

    INST_ID select NUMBER,

    recon_type VARCHAR2,

    gis_design_stock GMPVT. GMPVT_GIS_DESIGN_STOCK_T,

    stock_uop GMPVT. GMPVT_STOCK_CODES_T,

    x_status OUT VARCHAR2,

    x_escalation OUT VARCHAR2,

    x_recon_error ON GMPVT. GMPVT_GIS_RECON_ERR_T) IS

    GMPVT. GMPVT_GIS_RECON_ERR_T is an array of GMPVT objects. GMPVT_GIS_RECON_ERR, who has 12 fields including the new I added it.

    I have added a new field to the GMPVT object. GMPVT_GIS_DESIGN_STOCK, where GMPVT. GMPVT_GIS_DESIGN_STOCK_T is a table of GMPVT. GMPVT_GIS_DESIGN_STOCK, no problems encountered during the test.

    Next, I added a new field for the object of type GMPVT. GMPVT_GIS_RECON_ERR, the following error below occurs when the DBAdapter is called

    < Summary > Exception occurred when the link was invoked. Exception occurred during invocation of the JCA binding: "JCA binding run operation 'processStockRecon' failed due to the reference: Interaction processing error." Error in the processing of applications from running. GMP_SOA_RECON_PKG. Interaction of the PROCESSRECON API. An error occurred during the processing of the interaction to invoke APPS. GMP_SOA_RECON_PKG. PROCESSRECON API. Cause: java.lang.ArrayIndexOutOfBoundsException: 12 check to make sure that the XML file containing the data of the parameter matches the parameter definition in the XSD. This exception is considered non reproducible, probably due to an error of modeling. ". The called JCA adapter threw an exception of resource. Please review the error message above carefully to determine a resolution. < / Summary >

    I confirmed that the XSD for the stored procedure has in fact change, which has been generated by JDeveloper as I refreshed the database adapter.

    The statement "Cause: java.lang.ArrayIndexOutOfBoundsException: 12" I can't that assume somehow SOA has 12 parameters but the 12 setting was not saved.

    Any thoughts on what I might be missing. I can provide more information if necessary.

    Hello

    This problem has been resolved. Not deployed SOA composite and then deployed to the server of the SOA. For some reason, SOA has been either you see does not changes in the file XSD (cached?) or the XSD was not get updated.

    Thank you

  • How to call the parameter of the 101 on page 1 page

    Greetings,

    I wanted to call the parameter on the page "P101_USERNAME" to connect to page 1.
    Cust_user is a table where I m authticating my username and password, Authtication is doing well, but I want the client code in the table cust_user of the specific client to display after the connection on page 1. that i wrote query on page 1 "cust_id SELECT FROM cust_user WHERE UPPER (USER name) = UPPER(:P101_USERNAME), but it shows nothing, if I'm harcore specific username instead of: p101_username it works very well for example"cust_id SELECT FROM cust_user WHERE (USERNAME) = UPPER ('test'), '

    Please drivers me how to get the value of the text field (p101_username-login page) to page 1, it is the first page after login.

    Like I said earlier, use APP_USER.
    Go Page 1 now.

    See you soon,.

Maybe you are looking for