Refering nested symbols in array?

How do I reference, in an array,  symbols that are nested inside another symbol? Do I have to use variables or something?

Indeed, to get the current timeline position of a nested symbol, using an array, you could do this:
// array
var array_options = ["option1", "option2", "option3"];
myFunc = function(){
     // get "myParentSymbol", then get this object (index 0 from "array_options"), nested inside "myParentSymbol"
     sym.getSymbol("myParentSymbol").getSymbol(array_options[0] ).getPosition();

Similar Messages

  • Binding events to nested symbols from an Array

    Hello all,
         I have a pretty solid foundation in flash and actionscript and am trying to recreate some of my projects in EA.
    I want to bind mouseover, mouseout, and click events to eight nested symbols using a for loop. I am not sure if I have the syntax correct.
    I was experimenting with the following code in compostionReady
    var clipArray = new Array("A","B","C","D2","E","F","G","H");
    function init() {
              for (var i=0;i<clipArray.length;i++) {
              var tempClip = clipArray[i];
              sym.getSymbol("Model2").$(tempClip).mouseover(function(){
                     sym.getSymbol("Model2").getSymbol(tempClip).stop("start")
              sym.getSymbol("Model2").$(tempClip).mouseout(function(){
                      sym.getSymbol("Model2").getSymbol(tempClip).stop(0)
    init();
    The code seems to run but every symbols' rollover only affects the last element of the array. So if I rollover A-G, symbol H with stop at "start". If I change the order in the array, it is always the last symbol affected.
    Thanks for any help you can give
    Craig

    Thanks Resdesign for your helpful example. I am going to adapt it to my needs

  • I'm trying to play Symbol A and it's nested Symbol B and C with one button, and play Symbol B and C without playing Symbol A with a second button...

    I can't seem to get the nested symbol to play without it's parent playing too.
    This works for getting both symbols to play on button 1
    sym.getComposition().getStage().getSymbol("marketing_buttons").getSymbol("online").play();
    sym.getComposition().getStage().getSymbol("marketing_buttons").getSymbol("promotions").pla y();
    Everything I've done to play just B and C play all three. Is what I'm trying to do even possible?
    Thanks in advance.
    -h

    sym.getComposition().getStage().getSymbol("marketing_buttons").getSymbol("online").play();
    sym.getComposition().getStage().getSymbol("marketing_buttons").getSymbol("promotions").pla y();
    This works now to play all three from one button. With a different button, I want to play just the nested "online" and "promotions", plus add an completely new animation to both. All without effecting the animation in "marketing_buttons".

  • Issues animating symbol from another nested symbol instance

    Got quite the weird issue here regarding animating a symbol when mousing over and/or out of a symbol nested inside a symbol. You can see the example here. Rollover the word VISION. What happens is another symbol animates downward using JQuery's animate feature. Mousing out brings it back up.
    What's actually happening? The symbol at times animates up and down uncontrolably. It eventually stops, but not necessarily in the correct spot. Is it because of all the nesting? I'm trying to keep this as clean as possible which is why I'm nesting symbols. Much like I would a Flash comp way back when.
    Here's the mouseover code for btnVision:
    var myBtnVision = sym.getSymbol("btnVision");
    myBtnVision.play();
    try {
        var stage = sym.getComposition().getStage()
        stage.$("secVision").animate({top: 100}, { duration: 1000 });
    } catch (error) {
        if (console && console.error) console.error("An error occured: "+error.toString(), error);
    and here's the mouseout:
    var myBtnVision = sym.getSymbol("btnVision");
    myBtnVision.playReverse(500, false);
    try {
        var stage = sym.getComposition().getStage()
        stage.$("secVision").animate({top: 70}, { duration: 1000 });
    } catch (error) {
        if (console && console.error) console.error("An error occured: "+error.toString(), error);
    I have a dropbox file with the examples at the following:
    https://www.dropbox.com/s/ccgapo20p233h7z/rollover.zip

    Solved! It was just a little extra JQuery code that did the trick. Basically inserting a stop action.
    try {
        var stage = sym.getComposition().getStage()
        stage.$("secVision").stop().animate({top: 100}, { duration: 1000 });
    } catch (error) {
        if (console && console.error) console.error("An error occured: "+error.toString(), error);

  • Access a nested symbol timeline from the main stage

    Hi all,
    Would love some help on accessing a nested symbol from the main stage please.
    To set the scene.....
    "Its an autumn day..
    no sorry...just joking...
    So i have a symbol called "NormalAnatomy" - its not on the main stage, but when a button is clicked it appears in the 'content' box which is just a rectangle on the main stage.
    Inside "NormalAnatomy" symbol is another symbol called "Scrub_all" which is an animation
    For users to view the animation they use a scrub bar like this lovely lady has invented:
    Create Click and Touch Draggable Scrubbers with Edge Animate CC | sarahjustine.com
    So for Sarah Justines scrubber to work - the main stage has a lot of actions added to it. Also the "timelinePlay" symbol is on the main stage
    Its starts:
    var symDur = sym.getSymbol("timelinePlay").getDuration();
    var mySymbol = sym.getSymbol("timelinePlay");
    var scrubber = sym.$("scrubber");
    var bar = sym.$("bar");
    sym.$("mobileHit").hide();
    var dragme = false;
    So I put my "NormalAnatomy" symbol on my main stage to see if the code would work and changed all the relevant details.. and indeed it worked!
    var symDur = sym.getSymbol("NormalAnatomy").getSymbol("Scrub_all").getDuration();
    var mySymbol = sym.getSymbol("NormalAnatomy").getSymbol("Scrub_all");
    var scrubber = sym.getSymbol("NormalAnatomy").$("scrubber");
    var bar = sym.getSymbol("NormalAnatomy").$("bar");
    sym.getSymbol("NormalAnatomy").$("mobileHit").hide();
    var dragme = false;
    But i don't want the "NormalAnatomy" symbol to be on the main stage as I want it to appear in the 'content' box only when i hit a btn
    So as soon as I took this symbol off the main stage, the scrubber doesn't work. So I click a btn, and the symbol appears in the content box but the scrubber doesn't work.
    so I tried in front of the "NormalAnatomy"
    getStage().
    getStage("content").
    getComposition().getStage().
    getSymbol("content").
    but nothing works
    The main problem must be the fact that the NormalAnatomy symbol appears inside a content box so the MainStage actions doesn't know how to find it??
    So my question is... what should I put in the main stage actions to make it access the "NormalAnatomy" symbol?
    Thanks for your help in advance!

    On click handler for the symbol use
    sym.getComposition().getStage().getSymbol("nameofsymbol").play();
    or
    sym.getSymbol("nameofsymbol").play();
    replace the italics with the literal name of the symbol as it appears in the Elements panel.
    Some API details found here (http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html) in the Work With Symbols section.
    Darrell

  • Flash hangs because of too many nested symbols

    I am trying to create an Flash application where areas expand
    when the user pushes a button which pushes the rest of the GUI down
    as it expands. To accomplish this, I have every line of the GUI (it
    is a chart-looking interface) nested in the symbol above it,
    creating nested movieclip, inside of nested movieclip, etc. This
    way when the user clicks to expand the section to view more
    details, it will move down all the symbols. Eventually this causes
    my Mac g5 to hang indefinitely when trying to put the last groups
    together.
    Do you think it is the many nested symbols that are causing
    this? They go as far as 9 deep sometimes. My 400KB fla file will
    end up taking 1 GB of memory and spiking the CPU at 100%, and, of
    course, is not responding. Thank you.

    Make an official bug report on this. I and a few others have
    experienced the identical problem, using PCs, but are unable to
    supply sample files for Adobe to test due to confidentiality
    restrictions. If you can supply Adobe with your sample file, maybe
    they can figure out the problem and fix it.
    By the way, the problem never occurred for me in previous
    versions of Flash.
    Please report it here ASAP:
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • More syntax questions about nested symbols

    I have a symbol timeline that does everything I need it to do except to access a function within the stage symbol. I would have thought that calling the function in the stage symbol from a nested symbol (which is loaded dynamically, if that makes any difference) would be something along the lines of:
    sym.getComposition().getStage().gotoNextSlide("slide5");
    but no luck. I can alert the stage itself as [Object Object], which brings up another question. Is there an always-available property of objects that one can alert or trace to make sure the correct object is being targeted? I've had no luck with the symbol's id, name, or symbolName.

    Sure. You've seen one form of the project I'm working on, though I'm at the next speedbump. Here's an excerpt of the involved parts.
    I have the stage symbol and within that symbol, I have a function:
    function gotoSlide(slideName){
              fadeTo(slideName);
    function fadeTo(slideName){
         /// this all works fine, when called from the main timeline
    In the composition, I'm loading slides from the library and on the timeline of one of those slides is the following.
    navHidden = true;
    var trueButton = sym.getSymbol("answers").$("true");
    trueButton.bind('click',goNext);
    function goNext(){
              sym.getComposition().getStage().gotoSlide("slide_05");
    I know there are other syntaxes I could use but refactoring is in the future. The console log I get is:
    Object [object Object] has no method 'gotoSlide'
    It's slide 5 in these:

  • Dragging rotated and nested symbol causes registration point issues

    Has anyone noticed registration point issues when trying to drag a nested symbol or if you place a symbol on the stage and manually roated it with the rotate tool?
    I have been tryig to master the science of this and am still having a helluva time. It looks like it thinks your mouse is the 0,0 point and instantly jumps the symbol you are attemping to drag.
    Has anyone else noticed this and figured out a workaround?
    I noticed if I dynamically place the symbol it doesnt have this issue but I would prefer to not be forced into that

    Yes there is. After you have paused at the IN-point, hit shift + left arrow, this will mark the IN-point. Play to OUT-point, pause, shift + left arrow and the clip is selected from the two points.

  • Problem deleting nested symbols

    Hi there,
    My company has been developing interactive content using Edge Animate since version 2. After upgrading to 5.0, many of our compositions stopped working properly, with the console returning this error:
    Uncaught TypeError: Cannot read property 'id' of null
    After some investigation, I was able to isolate the problem: it seems that when a child symbol is created within another child symbol, the script stops being able to differentiate between the parent symbol's children and grandchildren. So, when you delete the nested symbol, then go to delete the parent symbol, this error occurs and the whole composition breaks.
    Here's a test file demonstrating the problem: Dropbox - test2.zip
    Rolling back to 4.0 for now, as we need to begin content production ASAP. Please let me know if this is a bug that will be resolved, or if there's a new way of implementing this kind of functionality.
    Cheers

    Thanks for your help, but I can't seem to locate the update. I've checked the page multiple times and signed out/in of Creative Cloud, both in-app and in browser. 2014.1 remains the latest version. Tried all this just now, as well as on the 20th. Here's a screenshot from a second ago:

  • Editing (nested) symbols

    Hi,
    I am creating a plugin in which symbol isolation can be initiated the "normal way" (by double clicking on an instance) or programmatically. The latter uses the following code:
    To start editing:
    sAISymbol -> SetEditingSymbolDefinition(symbol, someArtHandle)
    Next I am listening to kAIBeforeIsolationModeChangedNotifier and when it occurs I am saving the symbol:
        //Get the isolated art
        AIArtHandle symbolParent;
        AIArtHandle currentSymArt;
        ai::AutoBuffer<AIArtHandle> parentChain;
        sAIIsolationMode->GetIsolatedArtAndParents(&symbolParent, &parentChain);
        err = sAIArt->GetArtFirstChild(symbolParent, &currentSymArt);
        //Get current symbol
        AIPatternHandle currentSym;
        ai::UnicodeString isolatedName;
        err = sAIArt->GetArtName(currentSymArt, isolatedName, NULL);
        err = sAISymbol->GetSymbolPatternByName(isolatedName, &currentSym);
        err = sAISymbol->EndEditingSymbolDefinition(currentSym, true);
    (There must be an easier/better way to do this, and I'd love to hear about it!)
    This all seems to work. However if there is a nested symbol, things get more complicated. The following scenario fails:
    1) initiate symbol isolation programmatically
    2) initiate symbol isolation of nested symbol by double clicking on it
    3) exit isolation mode
    There are no errors but the nested symbol isn't saved. This might have to do with the precondition of EndEditingSymbolDefinition, which is StartEditingSymbolDefinition? Double click on symbol instance doesn't seem to trigger that? What is the real difference between those anyways (under the hood i mean)? In the above scenario, how can I save the changes made to the nested symbol?
    Thanks,
    Tom

    Hi,
    I am creating a plugin in which symbol isolation can be initiated the "normal way" (by double clicking on an instance) or programmatically. The latter uses the following code:
    To start editing:
    sAISymbol -> SetEditingSymbolDefinition(symbol, someArtHandle)
    Next I am listening to kAIBeforeIsolationModeChangedNotifier and when it occurs I am saving the symbol:
        //Get the isolated art
        AIArtHandle symbolParent;
        AIArtHandle currentSymArt;
        ai::AutoBuffer<AIArtHandle> parentChain;
        sAIIsolationMode->GetIsolatedArtAndParents(&symbolParent, &parentChain);
        err = sAIArt->GetArtFirstChild(symbolParent, &currentSymArt);
        //Get current symbol
        AIPatternHandle currentSym;
        ai::UnicodeString isolatedName;
        err = sAIArt->GetArtName(currentSymArt, isolatedName, NULL);
        err = sAISymbol->GetSymbolPatternByName(isolatedName, &currentSym);
        err = sAISymbol->EndEditingSymbolDefinition(currentSym, true);
    (There must be an easier/better way to do this, and I'd love to hear about it!)
    This all seems to work. However if there is a nested symbol, things get more complicated. The following scenario fails:
    1) initiate symbol isolation programmatically
    2) initiate symbol isolation of nested symbol by double clicking on it
    3) exit isolation mode
    There are no errors but the nested symbol isn't saved. This might have to do with the precondition of EndEditingSymbolDefinition, which is StartEditingSymbolDefinition? Double click on symbol instance doesn't seem to trigger that? What is the real difference between those anyways (under the hood i mean)? In the above scenario, how can I save the changes made to the nested symbol?
    Thanks,
    Tom

  • Nested symbols assign to the same symbol created dynamically

    I would like to create nested categories from one symbols.
    I have got symbol called categories_sym
    I have parent symbol like this:
    I would like to create nested symbols from categories_sym asigned to cat_container executed from products_details_sym
    Here is my code
    And cosole from Firebug
    Is it possible to create nested symbol in the same symbol created dinamically?

    Yes, it's possible, but note that your child_container is actually a div and not a symbol.  (The icons are different between a symbol and a container.)
    I've created a sample that should give you a good idea of how this API works:
    http://adobe.ly/MlNIzd
    Hopefully the comments will help you figure out how to successfully use this API.
    Thanks,
    -Elaine

  • Multiple Nested Symbol Interaction

    I have 3 symbols that in certain scenarios need to comunicate to nested symbols within those 3, as well as possibly go to a frame within one of the nested.  All actions are currently on the stage.
    STAGE
    a_sym
    a1_sym
    b_sym
    b1_sym
    c_sym
    c1_sym
    frame label
    Example: From the STAGE, a_sym, a1_sym (a1_sym is  the button) when pressed should trigger action
    Back to the STAGE, c_sym, c1_sym, stop on frame label
    hammer.on("tap", function(event) {
                        sym.getSymbol("a_sym").getSymbol("a1_sym");
    So the part i'm having dificulty is where and how to place the action for the nested a1_sym to trigger the action to go 
    Back to the STAGE, c_sym, c1_sym, stop on frame label

    In this line the extra sym is totally wrong.
    sym.getSymbol("a_sym").getSymbol("a1_btn").sym.getComposition().getSta ge().getSymbol("c_sym").stop("frame_label");
    Everything is triggered from the stage! So, when you are in a symbol, you can access other symbols or their nexted symbols from the stage by returning to the stage with sym.getComposition().getStage(). This is actually the STAGE.
    Let's say you have on the stage:
    symbolA contains symbolB (a button)
    symbolC contains symbolD which has label1 and label 2.
    You can access label1 from symbolB with a click event on the button:
    sym.getComposition().getStage().getSymbol('symbolC').getSymbol('symbolD').stop('label1');
    or in compositionReady you could use:
    sym.getSymbol('symbolA').$('symbolB').click(function(){
         sym.getComposition().getStage().getSymbol('symbolC').getSymbol('symbolD').stop('label1');
    symbolB gets access to the stage: sym.getComposition().getStage()
    symbolB gets access to the other symbol's label: getSymbol('symbolC').getSymbol('symbolD').stop('label1');
    Anyway, here is a sample to demonstrate this: https://app.box.com/s/dqph10hq67rzur9yu9we

  • How to access frame lable on main stage from a nested symbol

    All-
    I have two buttons
    btnA on the main stage
    btnB is nested inside btnA
    How do I access a frame lable on the main stage from btnB

    ok i figured this one out.
    i created a button symbol 'BTN-NAV-INTRO' and placed it on the main stage.
    i created a mouse over/out effect on it's timeline with an object on top called 'MC-HIT-AREA' 
    i placed the mouse over graphics inside the button and animated them on their own timelines
    coded the MC-HIT-AREA to play those timelines 'MC-HIT-AREA' is nested inside the button
    then on the main stage (this is what threw me) i set the button ('BTN-NAV-INTRO') to cursor and coded it to call the other button form the main stage.  Nesting it wasn't necessary.  I didn't realize you could have multiple mouse over/out effect below a mouse over effect from the main stage
    Edge rocks when i get it to do my bidding! 

  • Decide between Temoporary tables, Nested tables and Arrays

    Hello everyone.
    I need to convert T-SQL function to PL-SQL.
    I have this line in T-SQL:
    DECLARE @FTAP TABLE ([Value] [int] PRIMARY KEY NONCLUSTERED NOT NULL, UNIQUE ([Value]ASC )); As I see that, there are several equivalents in PL-SQL:
    1. Global temporary table.
    2. Nested table.
    3. Array.
    The table is declared in the function for reusing in the same function.
    When the function finished the table should delete.
    Also, the table should have index (or primary key...).
    What is the best choice?

    be careful in directly translating SQL server code to Oracle. they are fundamentally different in terminology and in the way they work.
    you can use associated arrays with record types:
    SQL> declare
      2     type rec_demo is record (id number, txt varchar2(100));
      3     type tab_demo is table of rec_demo index by binary_integer;
      4     v_tab_demo tab_demo;
      5  begin
      6
      7    v_tab_demo(1).id := 23;
      8    v_tab_demo(1).txt := 'demo';
      9    v_tab_demo(2).id := 54;
    10    v_tab_demo(2).txt := 'demo2';
    11
    12    for i in 1..v_tab_demo.count loop
    13       dbms_output.put_line(v_tab_demo(i).txt);
    14    end loop;
    15
    16
    17  end;
    18  /
    demo
    demo2you can also use collections in other ways. Most people would advise against using global temporary tables unless there's no other way and even then they'd recommend materialised views etc.
    can you elaborate a bit more about how you're using it? if we know what purpose it's being used for we may be able to assist a bit more efficiently.

  • Issues integrating niceScroll inside of nested symbol

    So I have to produce a custom scrollbar for a client. Which means going to one of the JQuery scripts to create it. I saw a couple of posts about niceScroll, so I downloaded it. It works fine for a text area div that's on the main timeline. But my issue is my text field will be nested inside of a symbol and none of my various attempts to get to said symbol work. In fact, when I tried it in the example, I'm uploading, the scrollbar completely dissappears. And no errors in Console. So I'm stuck. Anyone know how I might make this work? Here's the example from Dropbox:
    https://www.dropbox.com/s/mndqt2gd4z8uaj5/niceScroll.zip

    Hi ladobeugm,
    1) More precisely, instead of WB = 0 and
    buttons = {
                    reset:function(){
                    sym.getSymbol("btnCommunication").$("back").css({"opacity":"0"})
    you write
    buttons = {
                    focus: 0, // replaces WB
                    reset:function(){
                    sym.getSymbol("btnCommunication").$("back").css({"opacity":"0"})
    2) I had a quick look at your source. As you write in your first post "The other three buttons are basically the same.". Indeed, they differ only by the focus value (1, 2, 3 or 4) and by the name of the symbol. In such a situation, it's time for abstacting in a global function.
    First, rename the four instances : btnCommunication => btn1, btnIndividuality => btn2, btnCreativity => btn3, btnInclusivity => btn4.
    Then you define a global function in the compositionReady event handler :
    sym.overButton = function( numBtn)
      if ( NAV_BAR.focus != numBtn)
        sym.getSymbol("btn" +numBtn).$("back").stop().animate({opacity: 1}, { duration: 500 });
    The btn1 > mouseover event handler reduces to :
    sym.getComposition().getStage().overButton( 1);
    btn2 > mouseover event handler :
    sym.getComposition().getStage().overButton( 2);
    etc. Proceed similarly with a outButton function and a clickButton function.
    3)

Maybe you are looking for