Access symbols from external javascript code?

Because the coding support in the Edge editor (e.g. code completion) and the debugging tools are limited (and errors in browser console are useless), I've been moving as much of my code as possible into external javascript files.  From external js files, it has worked fine to access things on stage by jquery class selectors.  But I would also like to access symbols by instance name.  Does anyone know how to do this from an external js file?
I noticed that using the new in version 3.0 way of adding js libraries to the project doesn't work so well for my own js because "Preview in Browser" doesn't re-load my edited code each time.  So I'm still using yepnope for my own external js.
Doug

Have you checkout Bootstrapping in Edge Animate http://blogs.adobe.com/edge/2012/05/15/bootstrapping-edge-compositions/
Once the composition is loaded store the composition ID.Later you can access the symbols using the regular Animate API's
Like :
AdobeEdge.getComposition(compId).getStage().getSymbol('symbol_name')

Similar Messages

  • How do I control Edge symbols from external javascript?

    I have come across about a dozen similar discussions, but most have presented solutions that worked in earlier versions of Edge and no longer work.
    I am trying to use Edge to build animations that can then be integrated into larger non-Edge projects. I would like to then be able to control the Edge timeline or Edge symbols from elements OUTSIDE of Edge, such as another link or button in the page.
    I cannot seem to figure out how to properly reference the Edge stage or symbols.
    I have come across several proposed solutions for referencing Edge stage, such as:    
         var comp = AdobeEdge.getComposition("EDGE-966604542");
         var stage = comp.getStage();
         var comp = $.Edge.getComposition("EDGE-966604542");
         var stage = comp.getStage();    
         var comp = Edge.getComposition("EDGE-966604542");
         var stage = comp.getStage();
         and these either DO NOTHING or throw errors about either AdobeEdge or Edge or comp being undefined.
         Does anyone have a solution that really works with the current version of Edge Animate?
    Thanks
    Scott

    i created a Trigger @ 0ms and moved the function there...
    function hello(){
         alert("hello");
    still not getting the alert to fire with this in the external js:
    var comp = AdobeEdge.getComposition(compId).getStage();
    comp.hello();
    any thoughts?

  • How to call Edge Animate's play function from external javascript

    I have a symbol on the stage called "cart".... inside the symbol is my graphic that has a motion path put on it to the timeline (it is called "car_v1").
    On my stage I have a code to hide the symbol cart with an external css class :
    sym.$("cart").addClass( "hidden" );  ( this is the css - .hidden { display: none; } )
    I have a function that calls an external javascript file.. from that external file I want to get the timeline animation to work:
    here is the function called:
    checkCar();
    and here is the function:
    function checkCar() {
    if (AdobeEdge.countCar == 5){
    AdobeEdge.getComposition("EDGE-172492634").getStage().$("cart").removeClass( "hidden" ); // this works!
    AdobeEdge.getComposition("EDGE-172492634").getStage().$("cart").play(); //doesn't work!        <------------this is the line I need help with!
    // sym.getSymbol("cart").play(); // this works inside of edge and the timeline animation runs!!!
    Can anyone help me get the play function to work from my external javascript file? Thanks!
    Kristen

    Hi,
    You can try:
    function checkCar() {
    if (AdobeEdge.countCar == 5){
    var iCall = AdobeEdge.getComposition("EDGE-172492634").getStage();
          iCall.$("cart").removeClass( "hidden" );
          iCall.getSymbol("cart").play();

  • How to access symbol from different stage

    Hi everyone,
    I'm really new at Edge, so I still have a lot to learn and I need your help with something..
    I want to know how to access a symbol from another stage, here's what I've and what I want to do..
    I've the main index page with symbol named "content", in content I load other composition (page). called "page2".
    all I want to do is when I click a symbol "XX" inside "page2". The "content" symbol loads other composition called "page3".
    I don't know how to access "Content" from "page2", so I could load "page3" ..  that's it
    I feel like it's simple, but I just couldn't know how to do it, I',m sorry for bothering you for such a question, but I've searched a lot and I got nothing.
    Thanks
    I thought I could use something like this
    var comp = Edge.getComposition("EDGE-638329");  
    var stage = comp.getStage(); 
    var symp= comp.stage.getSymbol("content");
    EC.loadComposition("assets/units/stage1/s1_3/s1_3.html",symp);
    but it's still not working, could someone please tell me what I'm doing wrong?

    I have multiple compositions, where I need to go from one to another.
    I use click scripts in an element to do this, using identical pages with different animations on each page.:
    Click script:
    AdobeEdge.goLoc(url); //url is the URL of an identical new html page with a different animation
    Then I have a custom .js page that I use that has the function:
    AdobeEdge.goLoc = function(url) {
    location=url;
    Peter Small

  • Targeting Edge from external javascript file

    Is it possible to target adobe edge build from an external Javascript file? For instance, I click a button outside of the edge animate project and javascript tells Edge animate to "play()". What would that syntax be?

    Yes, it is.  Read this post for some background information and a sample.
    http://forums.adobe.com/message/5289458#5289458
    -Elaine

  • Use function from external Javascript file

    Hi All,
    Is it possible to use function from other javascript file. If possible then please post some example.
    Shonky

    As Harbs mentioned, you can use doScript().
    Maybe you can do something like this:
    First I created simple function in separate file and exported it JSXBIN
    function myAlert(myString){
        alert(myString);
    Then, I copied contents of that JSXBIN and put it into variable
    var securedFUNCTION = app.doScript("@JSXBIN@ES@[email protected]AffABC40BhAB0AzHjNjZiBjMjFjSjUDAC0EzAEByB");
    or
    var securedFUNC = eval("@JSXBIN@ES@[email protected]AffABC40BhAB0AzHjNjZiBjMjFjSjUDAC0EzAEByB");
    And simply called function
    myAlert('My test String');
    Also, you can use include external script with #include to call JSXBIN, but you need to wrap contents of JSXBIN file into doScript or eval().
    tomaxxi
    http://indisnip.wordpress.com/

  • Is it possible to get the serial number from external C++ code?

    Hi,
    I have a C++ library called by a CLF in the LabVIEW RT from my cRIO. I am trying to use the cRIO serial number in my C++ code for licensing purposes. Is it possible to get the cRIO serial number using the C++ API?
    I found information on how to do this from LabVIEW itself (http://digital.ni.com/public.nsf/allkb/74924FEE303​440998625727D005197FA), but it would be really helpful to be able to do it from the C++ code.
    Thanks in advance!
    Solved!
    Go to Solution.

    Hi mkossmann,
    Thanks for your suggestion. I have never used the VISA library from C++ or from LabVIEW, actually. I'm a newbie using NI hardware so sorry if the questions are too basic. 
    Is there documentation on the VISA library? I have found the DLLs on my windows machine, but I don't find any other documentation.
    Thanks,
    Sara

  • Loading library movie symbol from external swf

    Hi, I have a Flex/Air Application and I want this application
    to load in an external SWF and display a particular asset from the
    SWF library (just like attachMovie in AS2). I dont want to embed
    the SWF into the Air application. For the life of me I can't find
    any tangible info on how to do this. My second problem is that the
    assets sit in an SWF published for AS2 (is that an issue?). All
    content resides locally.
    Can anyone help or point me in the right direction?

    I see now how to import and display a library class object
    using:
    var MovieClipClass:Class =
    Class(loader.contentLoaderInfo.applicationDomain.getDefinition("myLibraryAsset"))
    var movieClip:Sprite = new MovieClipClass();
    addChild(movieClip)
    But this seems to only work for SWF's published for AS3 Flash
    Player 9.
    I need to do the same for SWF's published with AS2 Flash
    Player 7.
    Any ideas?

  • Accessing events from externally loaded swf file

    hello,
    I have an swf file developed in flash 8. After loading that
    file into SWF Loader control in flex builder 3, how can we access
    the controls and events present in that particular file ?

    "surya_dhul" <[email protected]> wrote in
    message
    news:gg84e2$slm$[email protected]..
    > hello,
    > I have an swf file developed in flash 8. After loading
    > that
    > file into SWF Loader control in flex builder 3, how can
    we access the
    > controls
    > and events present in that particular file ?
    I think you'll need to use localConnection.

  • Accessing Application from External Web Browser

    We are running Oracle Application Server 10.1.2.0.2, Oracle Forms 10.1.2.0.2, and Oracle Database 10.2.0.1. We are using SSL.
    Our Application Server, including WebCache is running correctly internally.
    What do I need to do to be able to view our application using our registered web address? I have tried everything, but I am missing something or doing something fundamentally wrong. I have been pouring myself over the Oracle Web Cache Administration and Deployment Guide.
    I am very confused. Our registered web site and the physical company servers have different web addresses.
    Registered: www.xyz.com
    Physical Servers housing OAS: www.company.com
    Registrant's Setup
    We registered our domain at Searchen Networks. At Searchen Networks, I forwarded our domain to:
    https://app.xyz.com:4444/forms/frmservlet?config=xyzforms.
    Is this correct? Or should I forward to one of the following?
         https://app.xyz.com:4444
         www.company.com (which is different than the website we registered)
    WebCache Setup
    I am very confused what to do in WebCache. Do I need to configure a Virtual Host, Name Site Definition, Server Mapping for Unnamed Site, or something else?
    I appreciate any help or direction offered.
    Thank you,
    Mika
    Edited by: Mika_ on Mar 4, 2010 9:29 AM
    Edited by: Mika_ on Mar 4, 2010 2:04 PM

    We added SSL after the fact and this works on ours
    https://our.host.com:4443/forms/frmservlet?config=<name_in_form_config>
    (Not sure why 4443 instead of 4444)

  • Opening an external file containing javascript code

    I'm trying to develop a PDF in two languages. When pushing a button, all questions and list-of-values for possible answers should be translated.
    I created and initialized several variables with the two language phrases with javascript. Everything is inside my code.
    Is there anyway that when a button is pressed an external file is read, bringing that javascript code for questions ans list-of-values? My concern is that currently I have a duplicated code, but if I want to implement three, four languages it will grow without control.
    This is an example I wrote in my code:
    var TxtAuxL1ESP = new Array();
    var TxtAuxL1ING = new Array();
    TxtAuxL1ESP[0]=", como ";
    TxtAuxL1ING[0]=", such as ";
    TxtAuxL1ESP[1]=": el último año ha obtenido ";
    TxtAuxL1ING[1]=": last year it obtained ";
    TxtAuxL1ESP[2]="%, en los últimos tres años ";
    TxtAuxL1ING[2]="%, in the last three years ";
    TxtAuxL1ESP[3]="% y en los últimos cinco años ";
    TxtAuxL1ING[3]="% and in the last five years ";
    if (P1.BtnIdioma.border.edge.stroke == "raised") {
        var TxtAuxL1=TxtAuxL1ESP;
        var TxtAuxL2=TxtAuxL2ESP;
        var TxtAuxL3=TxtAuxL3ESP;
    else {
        var TxtAuxL1=TxtAuxL1ING;
        var TxtAuxL2=TxtAuxL2ING;
        var TxtAuxL3=TxtAuxL3ING;
    What I was thinking is to store TxtAuxL1ING in one file, TxtAuxL1ESP in another file and read them from my javascript code inside the PDF. Is it possible?
    Regards
    JC

    Hi,
    maybe this solution ist interesting for you.
    It populates form fields with data read from an attached XML file.
    http://thelivecycle.blogspot.de/2011/01/populate-data-from-attachment.html

  • How can i Use the symbols from the main html page?

    Hello!
    Im trying to find a solution for days!!
    i need to use my symbols from the html page, for example to hide the symbol i want to use: sym.$( "sym1" ).hide(); or to make it draggable (with jquery UI) i wanna use: sym.$( "sym1" ).draggable(); but it doesn't work.
    i know i can do the same from the edgeActions.js file and here is the working code:
          Symbol.bindElementAction(compId, symbolName, "document", "compositionReady", function(sym, e) {
             var ex1 = sym.$( "farmer" );
             //ex1.html( '<input type="text" />' );
             yepnope({
                 both: [
                     "libs/jquery-ui.min.js",
                     "libs/jquery-ui.css",
                 callback: function() {
             ( ex1 ).draggable();
    but the main problem is that it's always include this file as the very last .js, so in case Im trying to use the symbols from the index.html page (For example:  ( ex1 ).draggable();  ) the variables are undefined (because it read the html first)...
    Please Help, Im desperate..
    Thank you very much!!!
    Eran

    Hi, Eran-
    You will want to use the AdobeEdge.* APIs, which should give you access from external JavaScript into your Edge Animation.  The API document has information on that.  However, you will need to wait until the runtime loads, so you should use the bootstrapping method that is outlined in Josh Hatwich's post on our blog:
    http://blogs.adobe.com/edge/2012/05/15/bootstrapping-edge-compositions/
    Hope that helps!
    -Elaine

  • Javascript Code Assist Delay Time

    How can I increase the delay time before code assist pops up when editing javascript in a .cfm file?
    Under Preferences:Coldfusion:Editor Profiles:Editor:Code Assist
    there is a setting "Delay before showing Code Assist" but changing this setting does NOT alter the javascript pop up delay.
    Under Preferences:HTML:Editors:JavaScript:Code Assist
    there is no similar setting.
    So maybe I can edit this setting in a config file or something? I'm using coldfusion builder 1.0.0.271911 on snow leopard 10.6.3
    thanks.

    do I download Aptana plugin?
    OMG please NO! Aptana is a bloated pig, and is what made CFBuilder 2 so slow.
    I would suggest putting your JavaScript code in a separate file from your ColdFusion page, and using the <script> tag to load it in.  If you need to pass ColdFusion variables into JavaScript, put a small <script> block on the CFML page wrapped in <cfoutput> just to create and populate the JavaScript variables, then add a second <script> tag to load your external JavaScript file.
    By keeping your JavaScript separate from CFML code you achieve multiple benefits:
    The built-in JavaScript parser/syntax highlighter will actually work, as those CF Builder features are somewhat dependent on recognizing the file extension to know which parser to use.
    Maintenance of your application will be easier, because you don't have a mixture of CFML and JS code in the same file, and thus the files will be smaller and more targeted.
    You can run your JavaScript file through "linters" to validate syntax.
    You can minify your external JavaScript code files for better performance.
    If you use build tools such as Grunt or Gulp, you can automate 3 and 4 without potentially breaking any CFML code in the process.
    Probably additional benefits I'm not thinking of at the moment (someone will chime in I'm sure).
    HTH,
    -Carl V.

  • Setting bpel variable using external java code

    Hi all
    I would like to ask if there is a way to set bpel process variable during process execution from external java code using java api without using java embedding code?!!
    Thnx in advance

    Hi, I wanna to know if it is possible at all to edit/update value of variables in a process instance via external java code?
    In fact I don't believe that we can set a variable remotely using java APIs.Am I right?
    For example,is it possible to change the value of a field in the user task form(that is sent to a user to fill and complete the task)?

  • How can I access JSP variables from a JavaScript function in a JSP page?

    Respected sir
    How can I access JSP variables from a JavaScript function in a JSP page?
    Thanx

    You may be get some help from the code below.
    <%
        String str="str";
    %>
    <script>
        function accessVar(){
           var varStr='<%=str%>';
           alert(varStr);// here will diplay 'str'
    </script>

Maybe you are looking for