TweenMax a  Child symbol

Hello everybody,
this is my last try, then I will return to a brave tweening Designer.
I asked a few times ago, but unforunately no solution at the end:
I placed a symol on stage with a trigger at the first frame:
sym.stop();
var eins = sym.createChildSymbol("eins", "Stage");
eins.getSymbolElement().css({
          'position': 'absolute',
          'left': 100,
          'top': 0
Now I know (thank you BigMucho) that I can move the symbol with te following code:
var eins = sym.createChildSymbol("eins", "Stage");
var moveEins = eins.getSymbolElement();
TweenMax.set(moveEins, {position:'absolute', left:100, top:0});
TweenMax.to(moveEins, 2, {y:120, scale:1, opacity:1, delay:0, ease:Expo.easeOut});
Whith this code I placed the symbol from the library and move it in one step.
But I want to move the symbol (eins) which is already placed on the stage (with a trigger),
whith a button afterwards.
For better anderstanding:
http://go-motion.net//upload/examples/04/test.zip
Maybe there is someone, who can imagine what I want.
Greetings form germany
Oliver

Hi, Oliver-
Here's your project that has animations done using jQuery animate().  I know this isn't quite what you're looking for, but your TweenMax library isn't loaded in your project.  For more information on how to get this included, check out this forum post:
http://forums.adobe.com/message/5092621#5092621
If you're dynamically loading your symbol element, you're going to need to save the reference somewhere and then refer to it later.  You can at least see what I did using your project files here:
https://creative.adobe.com/share/edac5fb5-7f14-448c-9f3f-b13fbc774ad5
As you can see, what I did was to save a variable with the symbol instance reference, and then when I wanted to use it later, loaded the variable into the current scope, then grabbed the DOM by using getSymbolElement().
Hopefully this points you in the right direction.
Thanks,
-Elaine

Similar Messages

  • Unable to get realtime position of animated child symbol's div from parent node (Stage)

    hi,
    for a data viz project, i've created an animated child symbol which changes its position on realtime basis. however, for some calculation purposes, i'm not able to keep track of the  realtime position of the div through stage as it is only showing me fixed value (starting position of the child div).... can anyone help? or is there a way to make global variable which can store position value in child symbol and i can access those values on the main stage???

    Try these in compositionReady. Adapt the scope of your element.
    var symTop = sym.$('Rectangle').css('top');
    var symLeft = sym.$('Rectangle').css('left');
    Then use the variable value where needed.
    or
    var position = sym.$("Rectangle").position();
    console.log( "x or left: " + position.left + ", y or top: " + position.top );
    var x = sym.$("Rectangle").position().left;
    var y = sym.$("Rectangle").position().top;
    console.log("x=",x,"y=",y);
    var coord = sym.$("Rectangle").position();
    sym.$("test_Text").html("x:" + coord.left + "<br>y:" + coord.top);

  • Get and hide all child symbols

    I'd like to target all child symbol instances of my mT symbol and hide them.
    Something like this (except this doesn't work):
    childsymbols_d1 = sym.getSymbol("holder").getSymbol("d1").getSymbol("mT").getChildSymbols();
    for(var i=0; i<childsymbols_d1.length; i++){
              childsymbols_d1[i].hide();
    I don't want to use the timeline because I have a lot of child symbols, and would like to do this operation on several other symbols.

    i tried this and it works.
    I grouped the symbols in mT into a div called rect.
    sym.getSymbol("holder").getSymbol("d1").getSymbol("mT").$('rect').children().hide();

  • How to Position of a dynamically created child symbol.

    Hello Everyone,
    I created symbols instances on the stage by
    for(alpha = 0; alpha < 5; alpha++)
        sym.createChildSymbol("rect", "Stage");
    Now I wanted to set the position of each symbol  - The probelm is I don't know the names of the symbols instances that has been created. so I tried the following
    childSymbols = sym.getChildSymbols();
    for(k = 0; k < 5; k++)
        childSymbols[k].css({"position":"relative","left":k*50});
    it did not position the child symbols where i need it to be..
    HOWEVER, when I tried to apply css to an element inside the symbol it worked.
    for(k = 0; k < 5; k++)
        childSymbols[k].$("Rectangle2").css({"position":"relative","left":k*50});
    Please can anyone help..

    y = 0;
    x = 30;
    $.getJSON('slides.json', function(data){
                     for(alpha = 0; alpha < 5; alpha++){
                         var s = sym.createChildSymbol("rect", "Stage");
                         s.getSymbolElement().css({
                                          "top": x+"px",
                                          "position":"absolute",
                                          "right": y*315+20+"px"
                        x+=100;
                      // y+=100;
                              }//for

  • Target a child Symbol whith TweenMax

    Hello everybody,
    I need help. I placed a symbol on the stage:
    sym.stop();
    var eins = sym.createChildSymbol("eins", "Stage");
    eins.getSymbolElement().css({
              'position': 'absolute',
              'left': 100,
              'top': 0
    Now I want to move this symbol with tweenMax with a button
    If I place the symbol directly on the stage from the library and
    put the following code on the button:
    TweenMax.to(sym.$("eins"),2,{css:{y:120, scale:1, opacity: 1}, delay:0, ease:Expo.easeOut});
    everything is fine, except ChildSymbol does not move.
    But this is what I want, to move a placed ChildSymbol on the stage.
    I know it is a beginner question, but I dont know how to target a var whit TweenMax
    Maybe someone could help.
    THX
    Oll

    Hello and thank you for your answer but I am afraid I cant get it run. I posted a small zip file for better understanding,
    maybe you could have a look at it:
    http://go-motion.net//upload/examples/04/test.zip
    Thank you in advance
    Oll

  • Delete child symbol from stage

    Hi All,
    I need help deleting a symbol from the stage.  I have a list of symbols that are called to the stage at some point in a simulation. When the user leaves one symbol, it is supposed to delete itself and call up another (specific) symol.  For example.  I called the symbol “AR-HistAims” to the stage using
    var mySymbolObject = sym.createChildSymbol("AR-HistAims", "Stage");
                mySymbolObject.getSymbolElement().css({'position':'absolute','left': (mouseX - offset.left)/sx , 'top': (mouseY - offset.top)/sy});
                mySymbolObject.play();
    This works fine.  I place an invisible button in the symbols timeline and when it is clicked I want it to do two things. 
    call up “AR-percPass” (using the same code as above with a percPass in place of HistAims)
    remove “AR-HistAims” from the stage. 
    I can’t seem to get #2 to work.  I’ve tried codes below and above the code for #1.  When placed above, it deletes the current symbol, but doesn’t call up the new one.  When placed below, the new symbol appears on top of the old one.  The codes I've used are:
                var childSymbols=sym.getComposition().getSymbols("AR-HistAims");
                for(var i=0; i<childSymbols.length; i++)
                childSymbols[i].deleteSymbol();
    //and
                var mySymbolObject = sym.getParentSymbol().getSymbol("mySymbol").getVariable("AR-HistAims");
                stage.deleteSymbol();
    //and
    sym.getParentSymbol().deleteSymbol();
    Any advice would be appreciated.
    Thanks
    Randy

    Hi Randy,
    There are a few corrections you need to make in index_edgeAction.js file like as follows:
    1. In click handler, you don't have access to  mouseX, offset, sx, sy etc.
         mySymbolObject.getSymbolElement().css({'position':'absolute','left': (mouseX - offset.left)/sx , 'top': (mouseY - offset.top)/sy});
         So, make it like this:
         mySymbolObject.getSymbolElement().css({'position':'absolute','left': 0 , 'top': 0});
         Make these kind of changes for every click handler where you have used mouseX, offset, sx, sy etc, with appropriate left and top values.
    2. Just search for sym.getSymbolElement().deleteSymbol(); and replace it with sym.deleteSymbol();
    3. Comment out line#1366  having statement sym.deleteSymbol ();
    4. Search for sym.getSymbol(home).deleteSymbol(); and replace all such occurences with sym.getSymbol("home").deleteSymbol();
    With the above changes, things will work.
    hth,
    Vivekuma

  • Is it possible to make a contact form in child symbol?

    i want to use php - mysql based or pop3 contact form in symbol. you can see my sites navigation from: www.ugurcit.com.tr.
    is it possible, how can i use it in the symbols?

    pixlor wrote:
    Wow, Nadia! That's a really useful link! Thanks!
    You're welcome... coming from the Dreamweaver forum where I 'live' mostly, I do have a heap of links that I've been providing over there for years  :-)
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    Book: Ultimate CSS Reference
    http://www.sitepoint.com/launch/005dfd4/3/133
    http://twitter.com/nadiap

  • Remove a Dynamically Added Child Symbol

    I am trying to check if a symbol exists, and if it does remove it. Otherwise, add it. Since this is being added to a bettun, the goal is that an object shows up when you click and goes away when you click again.
    My current code is below. Help?!
    var chatPanel = sym.getSymbol("chat_wrap").getChildSymbols;
    if (chatPanel.length > 0) {
    chatPanel[0].deleteSymbol();
    else {
        // handle the error however you want here, or fail silently
        sym.createChildSymbol("chat_panel", "chat_wrap");
        console.log("symbol added")

    Hi Phil and thanks for your answer.
    I have got my own cellrenderer but i do handle selected nodes different..
    Here the code in the paint method of my treecellrenderer:
    public void paint(Graphics g)
         super.paint( g );
         Icon currentIcon = getIcon();
         TreeModelNode node = getCurrentUserObject();
         //Set color for node, selected or not.
         if(selected)
              g.setColor( new Color(0,0,132) );
              setForeground( Color.white );
         else
              g.setColor( getParent().getBackground() );
         //Get textarea to paint.     
         if( currentIcon != null && getText() != null )
              int offset = ( currentIcon.getIconWidth() + getIconTextGap() );
              g.fillRect( offset, 0, getWidth() - offset +1 ,getHeight()-1 );
         else
              g.fillRect( 0, 0, getWidth() +1, getHeight()-1 );
    }

  • Append Child symbols from XML and more

    Hello,
    I am trying to dynamically create set of symbols and change their contents from an XML
    I've managed to get the XML part and creating the Div dynamically.
    What I didn't got is how to apply data from XML to inner symbol divs
    such as <name>something</name> from the XML to text div in EDGE
    is there a way to control/access the newly created Symbols?
    Attaching the project so far.
    http://www.elijahu.net/download/append.zip
    Thanks for your Help.
    Elijahu.

    ==> Positioning a Dynamically Created Symbol
    Well,
    To change the entire instance, you use: .getSymbolElement().css(...)
    To change an instance element, you use: .$("elementName").css(...)
    $(xml).find('listing').each( function(){
                    var itemRenderer = sym.createChildSymbol("itemRenderer", "xmlContainer");
                    itemRenderer.getSymbolElement().css("display": "inline-block");
                    itemRenderer.$('name').html($(this).find('name').text());
                    itemRenderer.$('textBox').html($(this).find('text').text()).css("color","white");

  • What is the best way to delete dynamically-generated symbols from another symbol?

    in the onClick handler for 1 symbol, I have:
    var sandwhichQty1 = sym.createChildSymbol("sandQty1", "Stage");
    another symbol inside sandQty1 has the onClick method:
    this.deleteSymbol();
    which works fine, deleting sandQty1. I'd like to delete it, and others, from another button, in the circumstance where users don't close them this way.
    I notice that id and class are dynamically assigned to the child symbol, which makes it hard for me.
    any ideas?

    Hi, I did it in this way, and functions well; maybe this is not the best way, but worked for me. Obviously this code is based on the elainafineell's correct solution.
    This is my scenario:
    In a Trigger @ xxxxms there is that:
    var i = 1;
    $.each(results, function(index, element)
         var s = sym.createChildSymbol("mySymbol", "someContainer");
         // some code here
         // Creating the variable that save my new instance of mySymbol
         sym.setVariable("var_id"+i, s);
         i++;
    // a global var, take care with the name
    numOfInstances = i;
    Then, in a click action of some button, symbol, anything that support an action, I code this:
    sym.eraseSymInstance();
    And, in the creationComplete, I code the function like this:
    sym.eraseSymInstance = function()
              for(var i = 1; i <= numOfInstances; i++)
                             var s = sym.getVariable("var_id"+i);
                             s.deleteSymbol();
    For me function well.
    I hope this can be usefull for somebody else.

  • Symbol does not clone properly

    I clone a symbol (button) and change its rollover color, but the other symbols (from wich this one was cloned) get updated... I need the new symbol to have unique rollover.
    This is Firesworks CS3
    Thanx!.

    As Jim suggested, symbols work on the principal of Master-Child relationship. Any changes to the master object will broadcast the changes made to all the child symbols in the document.
    Clone places a copy of the object in place. Duplicate also does a copy n paste operation with the object moving 10 px in each direction.

  • Help, please! to stop animation of one symbol from anover or stage

    I'm not a great specialist in jquery, but I've had to deal with it. And have some expirience... But i can't do an elementary thing in edge animate, i guess. So, help me please!))
    I need to stop some child symbols from the timeline of parent symbol(or Stage). On the timeline of stage, i have trigger. At this moment all the child clips have to stop as one...
    I try to insert into trigger this code:
    (child clips names: 'stan', 'bizan', 'bak')
    var stantostop = sym.$("stan");
    stantostop.stop();
    var bizantostop = sym.$("bizan");
    stantostop.stop();
    var baktostop = sym.$("bak");
    stantostop.stop();
    and I'm sure, I'm doing something wrong(!!!), cause nothing changes.
    If you cant help, please advice me some source with a lot of examples of typical operations and commands like this! So thank you for reading!

    Thank you very much for your answer. I,ve started three topics before i,ve got an answer!)
    But I think I have some different problem
    It is in the organization of my clips:
    Stage->Ship_going->Ship_swinging->stan
    Stage->Ship_going->Ship_swinging->bizan
    Stage->Ship_going->Ship_swinging->bak
    Stan(and overs) are the clips wich are looped, and thats why, I think they can,t stop.
    (They are the flags of ship. And the problem is in that fact that when ship stop i want to stop all animation including the loop animation of flags, then I want to deleete all clips, but I cant delete this clips in the same way Icant stop them)
    I can show the example of my clip for you(itis rather amusing)))) and i guess you shall understand what i'm talking about)))
    Can I send you the zip with clip?
    elainefinnell wrote:
    Hi, Strashevsky-
    You don't need to refer to the jQuery object if all you want to do is stop the timeline.  You can simply do this:
    sym.getSymbol("stan").stop();
    OR
    var stantostop = sym.getSymbol("stan");
    stantostop.stop();
    Hope this helps get you pointed in the right direction!
    -Elaine

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

  • Move the created (and modified) symbol to another div.

    Hi,
    Let's say i have a container (it's a symbol... sym.container=sym.createChildSymbol("container","containers");)
    1. Created a child symbol "object" in one container.
    sym.object=sym.container.createChildSymbol("object","containerForObject");
    2. Made several changes to it.
    What i want to do now, is to
    1. Create a new container. sym.container2=sym.createChildSymbol("container2","containers");
    2. delete the symbol the "object" was in. sym.container.deleteSymbol().
    3. Put the "object" (without creating it again, just moving it) in the, new, sym.container2's "containerForObject".
    <out of ideas>
    Thanks,
    Dario

    Hi, Dario-
    When you call deleteSymbol, you're actually deleting the entire instance of the symbol.  Is there a reason you want to reparent the symbol that way?  Another way to handle it is to create the symbol attached to the Stage or a dummy object and then create a link to it using a variable on one symbol or another.  That way, you only create the object once but have a reference to it in one symbol or the other.
    Hope that helps,
    -Elaine

  • Replacing symbols dynamically

    Hi all,
    I am trying to make a fairly simple user interface. I have 3 buttons on stage and each button will pull out a correspoinding symbol from the library and display it on the stage.
    Eg. Click btn1 and it will show content1 from the library.
    So far it is working in that it shows the corresponding content but it appends subsequent content to the bottom of it. I need the content to be replaced instead.
    If you would be so kind as to offer some advice, consider this:
    I would prefer if I could dynamically get content from the library instead of having items on stage that are set to 'hide' and 'show'.
    Note: I noticed that when you create a child symbol on stage that Edge gives it a randomly generated ID. There is some code towards the bottom that tries to rename its ID attribute. I am not 100% sure if it is even doing what I expect it to do. Any improvements are welcome.
    var btnArray = ['btn1','btn2','btn3']
    function init(){
              for (var i = 0; i < btnArray.length; ++i) {
                        var j = i+1;
                        initBtns(j);
    function initBtns(num){
              sym.$('btn'+num).click(function(){
                        showContent(num);
    function showContent(num){
              var content = sym.createChildSymbol("content"+num, "Stage");
              content.getSymbolElement().css({
       "top":"0px",
       "left":"0px" 
       var oldID = content.getSymbolElement().attr("id");
       sym.setVariable("oldID", "content"+num);
       var newID = sym.getVariable("oldID");
       content.getSymbolElement().attr("id",newID);
       alert(content.getSymbolElement().attr("id"));
    init();

    With some help from a colleague I have found the solutioin. Hope it helps anyone else out there with a similar issue. One of the main issues was the a variable was declared localy and needed to be global. See below for full working code.
    var btnArray = ['btn1','btn2','btn3'];
    var myBoolean = false;
    function init(){
              for (var i = 0; i < btnArray.length; ++i) {
                        var j = i+1;
                        initBtns(j);
    function initBtns(num){
              sym.$('btn'+num).click(function(){
                        showContent(num);
    function showContent(num){
              if(sym.myBoolean){
                        sym.getSymbol(sym.content.getSymbolElement()).deleteSymbol();
              sym.content = sym.createChildSymbol("content"+num, "Stage");
              sym.content.getSymbolElement().css({ "top":"0px", "left":"0px" });
       var oldID = sym.content.getSymbolElement().attr("id");
       sym.setVariable(oldID, "content"+num);
       var newID = sym.getVariable(oldID);
       sym.content.getSymbolElement().attr("id",newID);
       sym.myBoolean = true;
    init();

Maybe you are looking for

  • How can I send out a voice memo by iphone 6 plus?

    How can I send out a voice memo to my friend? the voice memo last around 1.5 hours.  I tried to sent by email but not success. Pls. help.

  • Cannot load on 64-bit, Windows 7 (permissions)

    Configuration: Windows 7 Professional, 64-bit Installed Adobe CS6 Beta Extended on different drive (not C:) drive.  In my case, I used the W: drive (an NTFS drive). When opening either 32-bit or 64-bit versions of Photoshop, I get the following error

  • Install without CD

    I have am computer here with 6Gb HD. It have CD/USB/Floppy and network. We have no woriking OS on it right now. The computer I using right now have no working CDdevice and it's running winows XP so we can't burn the image. And the old computer can't

  • WEB ADI - Invalid date placed in service

    Dear all i've been trying to upload FA - addition spread sheet into the corporate book "As data Conversion", but it keeps show an error which is Invalid Date placed In service_. i have changed the date format to match it with system. i have no clue w

  • IMessage is charged as SMS several Times

    Even when the adressfield in the Messages-App is blue (what means that iMessage is given)  the receiver does not get the sended pictures. They only receive empty green bubbles. Further it is charged as a regular SMS to me. No matter if I have my phon