How to control dynamically created symbols

Hi, I'm new in edge but thanks to adobe forum that helped me a lot.
I'm trying to use ".createChildSymbol" to bring my symbols from the library to my stage. And in each symbol I have an OUT label, so every time a new symbol is called by a particular button, the last one plays from OUT label and new one appears at the same place.
It's all easy for two symbols and I do not need to set any vaiable for them. But I have almost 180 symbols, and a menu of buttons to call them, so every button needs to play the OUT label of the current symbol and also plays the new one and make it as the current one.
I would be truly thankful if someone help me to fix this problem.
sym.test = sym.createChildSymbol("test", "Stage");
sym.getComposition().getStage().setVariable("current", "test");
var current = sym.getComposition().getStage().setVariable("current");
sym.current.getSymbolElement().css({position:'absolute', display:'inline-block', top:167, left:91});

Ok, lets take a look at the code. I've changed the symbol names so it becomes a little more friendly.
So, I have an array of 4 animations ("animation1",  "animation2",  "animation3",  "animation4") and an array of 4 buttons ("button1",  "button2",  "button3",  "button4"). The names of the symbol instances are the things you have to change.
This is the code that goes inside Stage/compositionReady
var current_animation = null; // Index in array_options: 0=a, 1=b, 2=c, 3=d
var current_animation = null; // Index in array_options: 0=a, 1=b, 2=c, 3=d
var request_animation = null; // Index in array_options: 0=a, 1=b, 2=c, 3=d
var array_animation = ["animation1", "animation2", "animation3", "animation4"];
var array_buttons = ["button1", "button2", "button3", "button4"];
// Called by timeline.complete/location event inside each Animation
sym.playRequest_animation = function(){
  sym.getSymbol("animationContainer").getSymbol(array_animation[request_animation]).play('lead_in');
  current_animation = request_animation;
// Called on button click
sym.btnClick_animation = function(request_myAnimation) {
  request_animation = request_myAnimation;
  if(current_animation != null){
    sym.getSymbol("animationContainer").getSymbol(array_animation[current_animation]).play('lead_out');
    sym.getSymbol(array_buttons[current_animation]).play('option_exit');
  else{
    sym.playRequest_animation();
This bit of code goes at the trigger "click" inside all buttons:
sym.getComposition().getStage().btnClick_animation(0); // 0 index of array = a —> button1
sym.getComposition().getStage().btnClick_animation(1); // 1 index of array = b —> button2
sym.getComposition().getStage().btnClick_animation(2); // 2 index of array = c —> button3
sym.getComposition().getStage().btnClick_animation(3); // 3 index of array = d —> button4
There's also this code that enables the page, upon load, to open the first animation, therefore animating the first button (and disabling it) - it's located at the trigger "section_lead_in" wich only exists inside button1:
sym.getComposition().getStage().btnClick_animation(0); // 0 index of array = a
Finally, this block of code goes inside all animations and are located at 2000ms - during the process where the active animation as almost left the scene:
sym.getComposition().getStage().playRequest_animation();
Notice that, for the sake of organization, I have all my animations inside a symbol called "animation_Container".
Again, if you want, I can give you a hand with your files. Just post it.
Download the file again for an updated version.
P.S. I hope I didn't forget anything...

Similar Messages

  • How can I dynamically create symbols based on data in a database? For example: as a user selects an option, we want to create color swatch buttons in a certain area on the screen.

    We have all of our data in a Microsoft SQL server database and would like to load fabric options, and then color choices, based on this data. As fabrics are added, and/or color choices are updated, we would like Edge Animate to update automatically, without having to open the project and add/change options. Ultimately we would like to build an interactive designer that would then send all of the user's selections to us in an order. Is this possible?

    There is no like, but contains
    contains(LAST_NAME,'A')

  • How to get a dynamically created symbol to delete itself on click?

    Here's the setup...
    I want to have a dynamically created symbol appear upon click of a hotspot. In this case, you click on a pulsating hotspot and a popup box appears.
    Here's the code I'm using for that.
    //Create an instance element of a symbol as a child of the given parent element
    var mySymbolObject = sym.createChildSymbol("gardern_toxins_popup","stage");
    So we have the symbol "garden_toxins_popup" from my library placed dynamically on the page. I would like to assign an action to the pop-up itself that allows you to remove the symbol from the stage upon click.
    I feel silly for not being able to figure this out. I tried iterations of this bit of code...
    //Get the stage from the composition level, get the symbol
    sym.getComposition().getStage().getSymbol("garden_toxins_popup").delete();
    ...but it doesn't work.
    So I tried thinking like I was back in Flash and tried the following...
    this.parent.removeChild(this);
    But no joy on that as well. Is there something I haven't addressed in this logic or am I going about it in the wrong way? Thanks!

    Hi, chirpieguy-
    You'll want to use the deleteSymbol() API.
    http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html
    BTW, you should use the capitalized "Stage" to add it to the Stage - the lower case stage has a special meaning with Animate and might not give you what you want..
    sym.createChildSymbol("gardentoxins", "Stage");
    In the symbol itself, create a click event on a container div, then:
    sym.deleteSymbol();
    That being said, you don't need to dynamically create and delete an object.  What you can do is to use hide() and show() on an element and use the coordinates of your click to change the CSS value of top/left of this object so that you don't have to do the object management I highlighted above.
    Hope that points you in the right direction.
    -Elaine

  • Get the ID of a dynamically created symbol from library, INSIDE another symbol.

    Hi everyone,
    I'm trying to get the id from a dynamic created symbol from library.
    When dynamically creating the symbol directly on the stage (or composition level), there's no problem.
    But I just can't get it to work when creating the symbol inside another symbol. 
    Below some examples using both "getChildSymbols()" and "aSymbolInstances" 
    // USING "getChildSymbols()" ///////////////////////////////////////////////////////////////////////// 
    // ON THE STAGE 
    var m_item = sym.createChildSymbol("m_item","Stage");
    var symbolChildren = sym.getChildSymbols(); 
    console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
    // INSIDE ANOTHER SYMBOL
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement()); 
    var symbolChildren = sym.getSymbol("holder").getChildSymbols(); // Am i using this wrong maybe?
    console.log(symbolChildren.length) // returns 0 so can't get no ID either
    // USING "aSymbolInstances"" ////////////////////////////////////////////////////////////////////////// 
    // ON THE STAGE
    var m_item = sym.createChildSymbol("m_item","Stage"); 
    console.log(sym.aSymbolInstances[0]); // ok (i guess) x.fn.x.init[1] 0: div#eid_1391854141436
    // INSIDE ANOTHER SYMBOL
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
    console.log(sym.getSymbol("holder").aSymbolInstances[0]); // Javascript error in event handler! Event Type = element 
    In this post http://forums.adobe.com/message/5691824 is written: "mySym.aSymbolInstances will give you an array with all "names" when you create symbols"
    Could it be this only works on the stage/ composition level only and not inside a symbol? 
    The following methods to achieve the same are indeed possible, but i simply DON'T want to use them in this case:
    1) Storing a reference of the created symbol in an array and call it later by index.
    2) Giving the items an ID manually on creation and use document.getElementById() afterwards.
    I can't believe this isn't possible. I am probably missing something here.
    Forgive me I am a newbie using Adobe Edge!
    I really hope someone can help me out here.
    Anyway, thnx in advance people!
    Kind Regards,
    Lester.

    Hi,
    Thanks for the quick response!
    True this is also a possibility. But this method is almost the same of "Giving the items an ID manually on creation and use document.getElementById() afterwards".
    In this way (correct me if i'm wrong) you have to give it an unique ID yourself. In a (very) big project this isn't the most practical way.
    Although I know it is possible.
    Now when Edge creates a symbol dynamically on the Stage (or composition level) or inside another symbol it always gives the symbol an ID like "eid_1391853893203".
    I want to reuse this (unique) ID given by Edge after creation.
    If created on the stage directly you can get this ID very easy. Like this;
    var m_item = sym.createChildSymbol("m_item","Stage");
    var symbolChildren = sym.getChildSymbols(); 
    console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
    I want to do exactly the same when created INSIDE another symbol.
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
    Now how can I accomplish this? How can I get the Id of a dynamically created symbol INSIDE another symbol instead of created directly on the stage?
    This is what i'm after.
    Thnx in advance!

  • Address dynamically created symbol

    Hi - wondering how I can get the name of a dynamically created symbol (using CreateChildSymbol) so i can hide move and otherwise affect the symbols i have created.
    any ideas?
    thanks!

    This recent thread might help you out:
    http://forums.adobe.com/message/5691752#5691752
    Thanks,
    -Elaine

  • How to Controll Dynamic Checkbox Groups

    i want to create checkbox groups dynamically. Each group will have at least one child checkbox. if i select parent check box all child checkboxes should be checked.if i uncheck parent checkbox all child checkboxes should be unchecked.
    that check box group name also coming dynamically. i am trying to pass group name dynamically but it's not recognizing that name in javascript.
    pls help me on this how to controll dynamic checkbox groups.

    recognizing that name in javascript.Are you dynamically creating checkboxes with JSP?

  • To delete this dynamically created symbol

    Hello,
    I dynamically created  a symbol :
    var vid = sym.createChildSymbol("video_holder", "Stage");
    vid.getSymbolElement().html("<iframe src='//player.vimeo.com/video/44150607' width='500' height='281' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>");
    vid.getSymbolElement().css({"margin":"auto", "top":"100px"});
    the I want another button to remove that Symbol from Stage :
    vid.deleteSymbol(); or sym.getSymbol("video_holder").deleteSymbol();
    How to do it ?
    thanks forever !
    s.

    1) About sym.getComposition().getSymbols().
    It returns an array. So you have to browse it.
    2) About vid.
    This is the same name but two different variables.
    Because they are only available within their own code panel.
    To go further, see: http://learn.jquery.com/javascript-101/
    You have to read: "scope" and "closures".
    PS : je viens de voir que la vidéo est en français. Vous parlez français ?

  • How to delete Dynamically created input field UI Element

    Hi all,
              I want to delete dynamically created input field and label.
    Is there any method please tell.
    Thanks in advance
    Hemalatha

    Hi,
    In the WDEVENT parameter of the action handler you can find the event id.
    ***Variables
      DATA:
        lv_selected  type string.          "Selected tab value
    ***Structure and internal table for the Events and messages
      DATA:
        lt_events type WDR_EVENT_PARAMETER_LIST,
        ls_events type WDR_EVENT_PARAMETER.
    ***Field symbols
      field-symbols: <fs_value> type any.   "Attribute value in events table
    ***Move the event table to lt_events
      lt_events = wdevent->parameters.
      read table  lt_events into ls_events with key name = 'SAVE'.  "Button Id
      if sy-subrc eq 0.
        assign ls_events-value->* to <fs_value>.
        if sy-subrc eq 0.
          lv_selected  = <fs_value>.
        endif.                 "IF sy-subrc eq 0.
      endif.                 "IF sy-subrc eq 0.
    Regards,
    Lekha.

  • How-to handle dynamically created AppModules with JUApplication, JUMetaobjectManager

    Hi,
    I've got a JClient App, where I want to dynamically create AppModules in the Context of the RootAppModule.
    How can I best do this??? The problem is that I can't really use the JUMetaObjectManager.createApplicationObject method and hence I can't use PanelBindings.....well I can't use the JClient Framework.
    Is there a way to elegantly manage this issue??
    Every solution would be very appreciated! thanks.

    Hi, first off, no need to determine what has been checked or not. If the checkbox is checked, on the post, the value will be submitted as part of the request. If the checkbox is not checked, it will not be submitted (it's value will be null). Depending on what you need, I have approached this a number of different ways. One way is to name all checkboxes the same name. If you need to distinguish between two rows in the form, then in the value field for the checkbox, use some type of distinguishing factor, for example,
    <input type=checkbox name=chkName value="1:abc">
    <input type=checkbox name=chkName value="1:def">
    Now, you only have to make one call on the Servlet/JSP receiving the form post, request.getParameterValues("chkName") which will return an array of the non-null Strings that were checked.

  • Addressing dynamically created symbols

    I'm not sure what's the best way to address a specific dinamically created symbol because I don't see in Edge's API any way to get the symbol's instance name. The .getSymbol() method would be the easiest way to do it, but it takes the symbol "instance" name and I don't know which one it is. When I use .createChildSymbol() I just pass the symbol "type" name and the parent element name to be put inside but nothing about the symbol instance name that's been created. The .getChildSymbols() method doesn't help much because it retrieves "all" direct children instances found, and I have more than one and of different types.
    I need to get one specific symbol among several I created dinamcally, so how should I do it best?
    I'm thinking about using .getChildSymbols() and loop through them all, get the DOM of each symbol with .getSymbolElement(), then use the "class" attribute to at least identify the different types of children symbols retrieved. I now have a subset of children-brothers (symbols of the same type = class) and I can walk through them. At this point, my only hope to distiguish them is the z-index parameter I passed when I created the symbols using .createChildSymbol().
    One other option would be to "save" the returned handler to each symbol created with .createChildSymbol() in an object like this { symbol: handler, name: "any name", created: "date/time", ... } and save them in an array of objects.
    Any better ideas?

    Hi juicy_life,
    store it into a symbol variable instance that I know will persist (the stage, maybe)
    Looks like a global variable
    It's just annoying you can get a symbol manually added to your edge animation by its "name" using .getSymbol(), but there is not an easy way to use that function with a dinamically created symbol
    May be are you also an AS3 coder used to search through the display list accessing display objetc containers either by index (getChildAt()) or by name (getChildByName()).
    mySym.aSymbolInstances will give you an array with all "names" when you create symbols with .createChildSymbol().
    Thank you for this helpful information. I didn't know about it.
    "name" (ID), something like this: #eid_1379485757227_mySymType
    For a manually instantiated symbol symB, nested in symA, itself instantiated in the Stage Symbol, the fully qualified name (ID) is Stage_symA_symB.
    It's useful to write a global function for the behavior (on click for example) shared by a group of buttons, provided you adopt a naming convention btn1, btn2, etc. Passing the event objet to that function, you can then recover the number of the clicked button via
    evt.target.getAttribute("ID").substr()
    This abstraction avoids duplicating the same code (differing only by the button number) on each button.
    Gil

  • How do I dynamically  create a pdk:text / field?!!!!!!

    I have a form that is to let the user add multiple rows and I need to be able to dynamically create a text filed and assign the attributes maxlength, size, name,property, and also assign the onkeypress a java script function. the following code will get me a text box but none of the attributes work:
    function add_Row(TLBID)
    var tbody = document.getElementById(TLBID).getElementsByTagName("TBODY")[0];
    var row = document.createElement("TR");
    var tlbTD = document.createElement("TD");
    var txtelement = document.createElement("TEXTAREA");
    tlbTD.colSpan = 2;
    txtelement.cols="25";
    txtelement.rows="2";
    txtelement.name="newDCTResponseText";
    tlbTD.appendChild(txtelement);
    var tlbTD2 = document.createElement("TD");
    tlbTD2.valign="bottom";
    var txtelement2 = document.createElement("input");
    txtelement2.type="text";
    txtelement2.maxlength="5";
    txtelement2.size="2";
    txtelement2.name="dctqeBean";
    txtelement2.property="dctScoreTxtBox";
    txtelement2.onkeypress="do_validate()";
    tlbTD2.appendChild(txtelement2);
    row.appendChild(tlbTD);
    row.appendChild(tlbTD2);
    tbody.appendChild(row);
    }

    Hi Ray,
    Thanks for your response. I do not understand the explanation. Maybe it is because I did not explain what I need or maybe becasue I am new to TS. Here's what I'd like to do.
    Have a predefined list of IO names. Like:
    Nest1 
    K23    "DIO96/port0/line1"
    K24    "DIO96/port0/line2"
    Nest2
    K23    "DIO96/port1/line1"
    K24    "DIO96/port1/line2"
    I will have 2 nests(sockets) in my system running batch model. From what I understand I can have 1 sequence defined and TS that will execute 2 threads with 1 socket per thread. In this sequence I somehow need to pass to my VI the value of K23 which is different for socket1 and 2. I was thinking that I can somehow create the Property Name Dynamically. Sort of like that:
    RunState.Sequence.Parameters.GetPropertyObject("Nest%d",RunState.TestSockets.MyIndex+1).K23
    It would give the sequence running for socket 1 the value "DIO96/port0/line1" and "DIO96/port1/line1" for socket 2
    thanks
    J.

  • How can I dynamically create all kinds of items in runtime?

    sir:
    I always want to create items dynamically with forms50 in
    runtimes,But I found that items ,eg:text item,list item were
    be created in design time,it make me limited,I hope to control
    item freely,how can I do?
    null

    You can't.
    You should use another tool like JAVA or C.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by gang lee ([email protected]):
    sir:
    I always want to create items dynamically with forms50 in
    runtimes,But I found that items ,eg:text item,list item were
    be created in design time,it make me limited,I hope to control
    item freely,how can I do?<HR></BLOCKQUOTE>
    null

  • How to control job created inside a procedure

    Scenario:+*
    I have a package which has 14 procedures which are interdependent and hence running in sequence. The entire process will take around 1.5 hrs to complete. So inorder to bring down time consumed to complete this process i have identified few procedures among this 14 which can be run in parallel. That lead to me to use DBMS_SCHEDULER and had successfully splitted these procedures and now these procedures are execute some in parallel then some in sequence, the starting of one depending on the ending of other with the help of programs, chains and chain rules.
    To achieve this i have a job at the end of my package, to execute the chain, for which the auto_drop attribute is set to TRUE as i dont want the job to be in the database sitting idle. Here job is created on the fly.
    Issue:_*
    As soon as the controll reaches DBMS_SCHEDULER.ENABLE ('job'), my chain starts running in the backend and the API gives the output procedure is completed.
    Here actually the procedure is not completed as the job is still running in the backend. But the java code which calls the procedure is receiving the message that procedure is completed.
    Question:*
    How can i stop the API sending the message "Procedure succesfully completed" before completing the job.
    Please advice

    DBMS_SCHEDULER package use to execute Procedure, Executable blocks etc..without manual intervention on specific timings. As soon as you submits the job it will reply you "Procedure successfully completed" that means successfully accepted.
    It does not know how many times that job needs to be executed in future. After completion of job how it will return successful message ( to which session?).
    You need to check the status of the job using various data dictionaries available in oracle to know the status of your job.
    In java code you interpret that, whenever you get such message that mean job submitted not completed.

  • How do I dynamically create a hyperlink in Indesign with vb

    Hi, does anyone know how to create a dynamic link to Indesign with vb? I'm coding a catalog from Access database with images and would like to make an "Enlarge image" hyperlink while generating the page. Somehow I seem to have no luck in my code. Thanks for any suggestions.

    As simple as it sounds to create hyperlinks with VB into Indesign CS4 it really took time and effort to finally
    come up with the solution. With the kind help of  Max Dunn an old InDesign scripting bug with VB was discovered responsible for this. But if you split the job into two parts it can be done.
    First make the document without hyperlinks in VB by putting the URLs in script labels on each graphic frame. Then in Indesing run a post-processing script in JavaScript that iterates through the graphic frames, and for each, if it has a script label, set that as the URL for hyperlink.
    Here is how I did it in Indesign.
    var myDocument = app.documents.item(0);
    for(var myCounter = myDocument.rectangles.length-1; myCounter >= 0; myCounter --){
    alert(myCounter)
    var myRectangle = myDocument.rectangles.item(myCounter);
    var myLabel = myDocument.rectangles.item(myCounter).label;
    try{
    myHyperlinkURL = myDocument.hyperlinkURLDestinations.add(myLabel);
    myHyperlinkSource = myDocument.hyperlinkPageItemSources.add(myRectangle);
    myHyperlink=myDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL);
    myHyperlink.visible=false;
    catch(myError){

  • How to handle dynamically created checkboxes in JSP???

    Hello everybody,
    In a JSP page I would like to create checkbox dynamically on every
    result line (detail line), then check in some of them and finally pass the checked lines to a JSP bean which will handle them on a submit button press.
    The problem are:
    - how to index every checkbox in jsp result line in jsp page in order to avoid solutions like this:
    <input type=checkbox" name="value1">
    <input type=checkbox" name="value2">
    etc
    - how to read every checkbox to find the checked ones
    Is there anobody who has any experience from case like this?
    Please, help me.
    Best regards,
    Danny

    Hi, first off, no need to determine what has been checked or not. If the checkbox is checked, on the post, the value will be submitted as part of the request. If the checkbox is not checked, it will not be submitted (it's value will be null). Depending on what you need, I have approached this a number of different ways. One way is to name all checkboxes the same name. If you need to distinguish between two rows in the form, then in the value field for the checkbox, use some type of distinguishing factor, for example,
    <input type=checkbox name=chkName value="1:abc">
    <input type=checkbox name=chkName value="1:def">
    Now, you only have to make one call on the Servlet/JSP receiving the form post, request.getParameterValues("chkName") which will return an array of the non-null Strings that were checked.

Maybe you are looking for

  • Tax code problem

    We are using Taxinj tax procedure with different tax codes as per the sale tax like VAT 4 % and VAT 12.5 % ,CST etc. Now somebody has made the changes in % of sale tax in JIN6 in existing tax code and save it.Then craete the sales order with that tax

  • My iPod is "Stuck" on one screen! How Do I Fix It?

    My iPod Nano is stuck on the Screen it looks like when you reset it! I plugged it into my computer to sync it with music and when I took it out, the music was there but it wouldn't play. I tried hitting the fast forward button but then it reset and i

  • Issue with sending mail through java stored procedure in Oracle

    Hello I am using Oracle 9i DB. I created a java stored procedure to send mail using the code given below. The java class works fine standalone. When its run from Java, mail is sent as desired. But when the java stored procedure is called from pl/sql

  • Oracle VM Server 2.2.1 - support for NTFS external drive?

    Hi, Another "newbie" question here... we have just installed Oracle VM Server 2.2.1 on a Dell box and now we want to install some Template VM's that we downloaded. The problem is - they are on an external Hard Drive that is an NTFS drive. So - when w

  • How to add new function in B1

    Can i add new function in B1.Example exist function in 2005 version is Concat(,) if i want to add new function can i do.I want function to convert number to text for decribe total price, example total price = 3250 the text must show as 'three thousan