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?

Similar Messages

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

  • How can I control an iPad from a touch screen which is mirroring the iPad screen

    How can I control an iPad from a touch screen which is mirroring the iPad screen.
    This is a very important application for disability students who wish to use iPad apps but do not have sufficient fine motor skills to use the small screen of an iPad but could use a large format display touch screen.
    There must be a way.?????????? Help!!
    Peter Niass
    [email protected]

    Have a look here
    http://www.macstories.net/iphone/the-external-touchscreen-that-can-control-an-ip hone/

  • 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

  • After a Lion clean install, how do I retrieve my data from external back-up? Following Apple advice for use of Migration Assistant did not work creating similar issues leading to clean install.

    After a Lion clean install, how do I retrieve my data from external hard drive?
    Following Apple advice I used Migration Assistant which crashed new system twice which is why I had to clean install Lion in the first place.
    Is there a sure way of doing it?
    I have only a few programs that I will have to install myself and that should not be a problem.
    I just want my data, music and photos back where I can use them.

    Time machine backups. I went to migration assistant a few hours ago and limited my selection to "users", no need for applications, settings and other files.  Stuff started moving over at a fast pace but has now seemed to stall.
    I will let it run overnight as there are lots of songs and photos as well as a few movies.
    If that does not work, then I will go into TM and try restore. I have restored some things in the past such a mail files and it has worked well. 
    The Apple fellow at the store told me to go right into TM, he may have had a point. I'll get it eventually.

  • How can I move my project from external hard drive to my macbook pro?

    How can I move my project from external hard drive to my macbook pro? every time I try to do some editing, the sequence is very slow, thanks in advance

    Try here...
    Setting-up a new Mac from an old one, its backups, or a PC

  • How do I control my mac from another mac not in the same network?

    How do I control my mac from another mac not in the same network? Thanks

    You can do it manually, but it is much simpler if you use a tool such as Back To My Mac, LogMeIn, or something like that. Those programs enable you to connect to your computer through your router without you having to adjust the router settings manually.

  • Hi,disc wiped ,OSX10.9 back on ,how do I restore my data from external hard drive ?Any help welcome .

    Hi,disc wiped ,OSX10.9 back on ,how do I restore my data from external hard drive ?Any help welcome .

    There's Setup Assistant and Migration Assistant. The cleanest way to do it is Setup Assistant, but you only get that option once when you fire up a fresh install of OSX. If you're past that, you could reinstall OSX by booting with Command-R, or you could use Migration Assistant.
    Setup/Migration Assistant instructions:
    http://support.apple.com/kb/HT5872

  • HT1338 How can i control my iPad from my macbook?

    How can i control my iPad from my macbook?

    The iPhone has a "remote" app that lets you control Keynote on a Mac, but not on another iOS device (iPhone/iPad/iPod Touch).
    There are some apps that let you control limited content on another iOS device - but the content has to be within the app. You might check out SyncPad - perhaps you can import the presentation into it and then control it on the iPad.

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

  • How do you remove a symbol from the stage in Edge animate?

    Hello-
    I'm wondering how to remove a symbol from the stage in Edge Animate so you can jump to another place in the timeline.  In Flash, the symbol was only on the stage for the amount of frames you indicated.  Not sure how it works here.
    For example, I have 2 buttons on my first screen with some text that animates in.  I want the button click to take the user to another section in the timeline or (basically another scene, like in Flash)  that contains different content.  If I change the visibility the buttons are still there and will ( I assume) create problems when other elements are placed on top. 
    Or is the only way with code.  If that is the case what would that code be?
    I would appreciate any help.
    Thank you!

    What I usually do, is, once you have everything set up in the scene you are done with. highlight it all
    right click
    group elements in DIV
    Now all those items act as 1 group and then you give it a properties name, much like a symbol.
    THEN you can refer to that scene name and move it anywhere or hide it and slide in another scene that has the content for that next scene.
    basically you take all the elements that make up 1 scene, gruop it up, name it, and then in the code for the button say something like:
    on click:
    scenename.play(framenumber);
    that will then animate that scene according to any animation you gave it, such as moving to the left, off stage. while moving scene 2 that you create into the stage.
    or just have something like this hide it
    sym.$("scenename").hide();
    sym.$("scene2name").show();
    but if you do that, make sure in your CompositionReady code you hide all scenes EXCEPT the 1st one, so the user doesnt see them all instanatly anyway.

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

  • Controlling a symbol from a button inside of the symbol

    I hope this explanation makes sense:
    I have an animate file with buttons on the main stage that control symbols.
    (buttons are circles labeled 1876 and 1877)
    The symbols simply move a png image on and off the stage.
    For example, the two circles labeled 1876 and 1877 are PNG files made into buttons that control two different symbols.
    The symbols move the scoreboard image on and off the stage.
    Within the scoreboard image is an X, that I am hoping to put a button on top of within the symbol to close the symbol.
    The code I am using to move the symbols on and off the stage is:
    var current = sym.getVariable("current");
       if (current != "") {
          sym.getSymbol(current).play("out");
          sym.getSymbol("syboard1876").play("in");
       else {
          sym.getSymbol("syboard1876").play("shortIn");
       sym.setVariable("current", "syboard1876");
    syboard1876 is the green board png.
    Any idea how i can get the symbol to move off of the stage by tapping it?
    And will I be able to have multiple buttons beneath the symbol (that are hidden beneath the b=green board when it is visible)?
    This was the original tutorial I adapted the get the animation to work so far.
    Tutorial: Leveraging Independent Symbol Timelines « Adobe Edge Animate Team Blog
    Now I just need to figure a way to give the user the ability to tap the X to close the symbol.
    Any suggestions?

    you could use $each() with jquery in compositionReady
    if not you need to get back to stage with sym.getComposition().getStage() or
    you could use this in compositionReady
    function useButtons(element) {
    sym.$(element).bind("click",function() {
      sym.$('image').attr('src','images/'+element+'.png').css({"opacity":1.00});  // this is a code example - I used the same name for the buttons and image names.
    // add button names here
    ['', '','' ,'',''].forEach(useButtons);

  • How can I control a button from one swf file to another swf file?

    Hi,
    I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
    Now, how can I write code on my main.swf file for the button which is on my external.swf file?
    Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
    Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
    Thanks.

    Here's some example code that you should be able to adapt to your needs.
    // create a new loader object instance...
    var loader:Loader = new Loader();
    // make the download request...
    var request:URLRequest = new URLRequest("external.swf");
    // add a complete event listener to the loader
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    // start the actual loading process...
    loader.load(request);
    // create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
    var externalMovie:MovieClip;
    // this function is called when the download has finished and the file is ready to use...
    function completeHandler(event:Event):void {
       // set the contents of the loaded movie to the new empty movieClip...
               externalMovie = MovieClip(event.target.content);
       // add this new movie to the display list...
       addChild(externalMovie);
    Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
    externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
    function btnClickClose(event:MouseEvent):void {

  • CONTROLLING THE TIMELINE FROM EXTERNAL MC

    I have a website
    http://www.charlesmarsden-smedley.com/index1.html
    that I am building.
    In the projects section, if you navigate to Projects >
    Museum > Tower of London. You will see 'more information' link.
    This loads an external Movie clip for the text feild. I would
    like to make the 'more information' dissappear when it is clicked
    and the text appears in the target. The way I thought is best is to
    move the timeline on one frame and just remove the link, but when I
    click on 'back to images' link it reloads the images (external MC)
    but the 'more information' link is still hidden.
    How can I control the main timeline from an extrernal movie
    clip?
    Am i being rediculously long about this operation?
    thanks
    Harky

    maybe you didnt understand correctly.
    the 'more information' link loads an external movie clip (the
    text) into the right side of the page.
    At the bottom of this movie clip is a green link 'back to
    images' this button sits within the movie clip. So my problem is
    making this button controll the main timeline (as its root is the
    movie clip root, not the main web page root)

Maybe you are looking for

  • Changed DivX codec - now all DivX files give 'file importer detected inconsistency ... '

    Okay, so I've upgraded to DivX 7 - or so I thought (still says 6.8.5), long story short, NONE of my previously input DivX encoded avis work in Premiere anymore (Pro CS4). I get a message "File importer detected an inconsistency in th efile structure

  • LCM Migration error

    Hello All, we are facing a serious migration issue using LCM. We have made some changes in Production and wanted to move them back to Development. ( It works either way here). I tried using LCM using Shared services via workspace and executed migrati

  • Different security valuation based on listed or not on exchange

    Dear All, I was wandering if it is possible to make a differentiation on security valuation for the same valuation area: - In case the bond is listed ==> valuation at "market price" - In case the bond is not listed ==> valuation at "valued at cost" k

  • Ellipse 8

    I am not able to turn on my Ellipse 8 tablet. It was working fine this morning with more the 3/4 charge but now it's not turning on at all???

  • Flash cc 2014 - P12 certificate

    There is so much information on this but each article just explains how to do this for a desktop application. I need to do the following: I have an fla that is done, I need to publish as an app for Google Play can someone point me to the correct info