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

Similar Messages

  • 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 get the dynamic columns in UWL portal

    Hi All,
    I am working on UWL Portal. I am new to UWL. I have down loaded uwl.standard XML file and costomized for getting the  values for "select a Subview" dropdown and I am able to see the values in the dropdown. Now my requirement is to get the dynamic columns based on the selection from dropdown value.
    can any body suggest on how to get the dynamic columns in UWL portal.

    Hi  Manorama,
    1) If you have already created a portal system as mentioned in following blog
                  /people/marcel.salein/blog/2007/03/14/how-to-create-a-portal-system-for-using-it-in-visual-composer
    2) If not, then try to create the same. Do not forgot to give the Alias name .
    3) After creating a system, log on to the VC, Create one iView.
    4) Now Click on "Find Data" button from the list which you can view in right side to Visual composer screen.
    5) After clicking on "Find Data" button, it will ask for System. If you have created your system correctly and Alias name is given properly, then your mentioned Alias name is appeared in that list.
    6) Select your system Alias name and perform search.
    7) It will display all the BAPIs and RFCs in your systems.
    8) Select required BAPI and develop the VC application.
    Please let me know if you any further problems.
    Thanks,
    Prashant
    Do reward points for useful answers.

  • How to get the Dynamic UI component value from JSFF page to any managedbean

    HI ,
    We have list of bean objects in jSF page we are iterating the list of bean using the forEach loop and displaying the value into Input type text (UI component) value filed .
    If we try to get the UI component value in Managed bean we are not getting the dynamic values .
    The below piece of code used to retrieve the dynamic values from the JSF page doesn't have any form :
    UIComponent component = null;
    FacesContext facesContext = FacesContext.getCurrentInstance();
    if (facesContext != null) {
    UIComponent root = facesContext.getViewRoot();
    component = findComponent(root, componentId);
    then component type casting to the based on UI component which we trying to access and getting the value as " NULL " ..Please let me know how to get the dynamic values form the JSF ?
    Please let me know if any other approach or any changes required on above ?
    Thanks

    Hi,
    the root problem is this
    <h:inputText id="it3" value="#{familyList.ctn}" />
    <tr:commandButton text="Save" id="cb3"Note how each row writes to the same managed bean property, thus showing the same data. Instead your managed bean should expose a HashMap property that you then apply values to using a key/value pair. The key could be the ID of the field, which then you also should dynamically define e.g. cb<rowIndx>. The command button could then have a f:attribute assigned that has the row HahMap key as a value. This way you truly create value instances for the object
    Frank

  • How to get the dynamic Crosstab header name ?

    Hi ,
    The crosstab resaults shows as below ,How to get the dynamic Crosstab header name ?
    | Countryname |
    | Province1 | Province2 |
    | here to get CountryName | here to get CountryName |
    how to get the Countryname in data ceil?
    thanks

    Could you please elaborate on your requirement?
    You want header to be dynamic?

  • HOW CAN GET BACK MY TEXT MSG & PICTURES DELETED

    HOW CAN GET BACK MY TEXT MSG & PICTURES DELETED I REALY NEED 

    lilsimms1228 wrote:
    How can I get an overview of old text messages and phone call [personal detail removed]
    If you are the account owner, you can access the last year of calls records and the last three months of message summary (date, time, number texted, there is no where to see the text context) through your online account. Click on the HOME Tab once logged in and choose PRINT BILLS and then click on the pull down menu to choose any invoice for the last twelve months to view.

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

  • 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 to get the user created at and modified at properties for a site collection using powershell

    Hi guys, I Know how to get the list of users of a site collection by Get-SPUser cmdlet but hte problem is that this cmdlet doesnt give me the user Created at and modifed at properties 
    can any one tell me how to get these values via powershell???? 
    ps: ignore the 2013 screenshot.. i just want a way to get those values .. if you provide me solution in either 2010 or 2013 , i will crack the other..
    plz guys help me ...

    Get the User Information list and then get the user from that list
    $web = Get-SPWeb "siteUrl"
    $userInfoList = $web.SiteUserInfoList
    $userItem = $userInfoList.Items[0]; #0 here is just for demonstration. You take the user you want here or loop through all users.
    $created = $userItem["Created"]
    $modified = $userItem["Modified"]

  • How to get the Newly Created Material

    Hi all,
    Iam creating Materials using BDC sessions method,My Problem is to update the Newly Created Material in a Ztable.
    so iam getting the Newly created Matnr by the following peice of code
        SELECT  matnr FROM mara INTO  TABLE v_matnr
                               WHERE ersda = sy-datum
                               ORDER BY matnr DESCENDING.
    But the thing is,we are getting Previously created material.i.e the new material will be  created only after the sessions are processed,but when i write the above code in the program we are getting previous material.
    so how to update the newly created material.
    I think we can't do  that through program because we can get new material only after processing the session..so what is the solution for this.should we use userexits for getting the newly created material.
    thanks in advance
    balaji

    Hello,
    Use the <b>BAPI_MATERIAL_SAVEDATA</b> to create the materials.
    The BAPI will return the Material number which is created at that instance by which u can update the ZTABLE.
    Vasanth

  • How to access a dynamic created attribute in a context node?

    <i>Hello,</i>
    <i>who could help? I can't set a value for a dynamically created attribute which is bind to a table.</i>
    <i>My context of the view looks as follow (is defined in NetWeaver):</i>
      - Context
         - Availability (Node)
             - vctxService (Attribute)
             - vctxServiceDesc (Attribute)
             - ... (further predefined attributes)
             - ... (some have to be set dynamically as follows)
    <i>Then I have added attributes dynamically in the wdDoModifyView(...) - method, as follows:</i>
    for (int i = 0; i < max; i++) {
       // some code to dynamically create table columns
       // adding attributes dynamically
       IWDAttributeInfo attrInfo =       wdContext.nodeAvailability().getNodeInfo().      addAttribute("vctxAvailability_" + i, "ddic:com.sap.dictionary.string");
       tv.bindText(attrInfo); // bind to TextView in table
    <i>In the method onPlugFrom... I tried to set the values for the attributes "vctxAvailability_ + i" as follows:</i>
    for (int i = 0; i < max; i++) {
       IAvailabilityElement newAvailNodeElement =     wdContext.createAvailabilityElement();
       // some values will be set for the
       // predefined attributes of AvailabilityNode
       // newAvailNodeElement.set...( value );
       // newAvailNodeElement.setVctxService( xy.getServ() );
       // now the values of dynamically created and added
       // attributes in AvailabilityNode will be added
       // THIS DOESN'T WORK
       newAvailNodeElement.setAttributeValue    ("vctxAvailability_" + i, "value" + i);
    <i>It would be great if someone could help me.
    Thanks in advance.
    Kind regards,
    Carsten</i>

    Carsten,
    Here is a sample code that creates context attributes dynamically and also sets values:
    //Creates a node
    IWDNodeInfo nodeInfo = wdContext.wdGetAPI().getRootNodeInfo().addChild("TestNode", null, true, true, false, true, false, true, null, null, null);
    //If you want to bind the node to a model node then the
    //second argument to the above method should be the
    //model class.
    //Creates an attribute under the node just created.
    IWDAttributeInfo testAttrib = wdContext.wdGetAPI().getRootNodeInfo().getChild("TestNode").addAttribute("testAttrib", "ddic:com.sap.dictionary.string");
    IWDNodeElement testNode = wdContext.getChildNode("TestNode", IWDNode.LEAD_SELECTION).getCurrentElement();
    IWDNode testNode2 = wdContext.getChildNode("TestNode", IWDNode.LEAD_SELECTION);
    //Now you can bind testNode with the Model Node
    //You can also set a value to the newly created attribute
    testNode.setAttributeValue("testAttrib", new String("Value"));
    Hope this helps.
    Shakeel

  • How to get selected text values in a textarea by mouse click?

    Hi Everyone,
    What I am trying to do is to click on some texts in a textarea, then get the selected text value.
    If you guys have used an accounting software called Simply Accounting, you might understand better.
    I list all my customer names in a textarea. What I want is, when I click on one customer, another GUI pops up with this customer's information. My problem is that I don't know how to get the selected text value from a textarea.
    Could anyone give a hand here? Thank you in advance.

    Is there some reason you aren't using a JList or
    JTable to display
    the user names/information?Thank you for es5f2000's reply. You just gave me a better idea! There is not a particular reason I have to use TextArea to list my customers. As long as the component can make my idea alive, I definitely use it. Still, if there is any way to get a selected text value, it will help me a lot with my project. Thank you.

  • How to get rid of Yahoo which has replaced itself as the search engine on safari . I have tried going to safari and changing the default search engine to google and the homepage to no avail can anyone PLEASE help

    After updating Firefox . I notice Yahoo has taken over as the search engine on safari . I have gone into safari and changed the default browser and home page to google but yahoo is still there . Can someone Please tell me how to get rid of Yahoo . peter

    Since I looked everywhere for this answer and never found it I decided I needed to help!
    1. GO TO THE TOOL BAR WHERE IT SAYS SAFARI AND CLICK TO BRING DOWN THE MENU OF OPTIONS, CLICK ON PREFERENCES
    2.INSTEAD OF JUST CLICKING ON THE GENERAL TAB AND CHANGING THE SEARCH ENGINE LIKE EVERY OTHER STUPID SUPPORT TELLS YOU TO DO LOOK AT THE TAB THAT SAYS EXTENSIONS.
    3. Chances are you downloaded something that was made by a third party to "enhance" your web experience but really they just screwed you over, YOU CAN CHOOSE TO SIMPLY UNINSTALL ANY EXTENSIONS PUT ON YOUR COMPUTER BY CLICKING INSTALL, BUT TO BE SURE THAT THIS IS THE ROOT OF YOUR PROBLEM IN THE SECOND COLUMN SIMPLY CLICK ON THE UNDERLINED NAME OF WHO THE EXTENSION IS MADE BY IF CLICKING THE LINK BRINGS UP A YAHOO PAGE THIS IS THE SOURCE OF YOUR ISSUES AND SIMPLY UNINSTALLING THIS WILL RID YOU OF THIS  DUMB PROBLEM!!
    HOPE THIS HELPS!!!!

  • How to get notified of entry that are deleted?

    Hello,
    I'm trying to get notified when an entry is deleted after a certain expiration time. The listener that I've registed gets correctly all the added/updated notification but does not get anything as far as the entryDeleted() is concerned. My guess is that either my listener is not correctly configured or that my expiration schema is wrong. Here is the configuration I'm using:
    <backing-map-scheme>
    <local-scheme>
    <expiry-delay>10s</expiry-delay>
    <flush-delay>15s</flush-delay>
    <listener>
    <class-scheme>
    <class-name>com.cache.MyCacheListener</class-name>
    </class-scheme>
    </listener>
    </local-scheme>
    </backing-map-scheme>
    Any idea why my I don't get notified or why my entries are not deleted?
    Thanks
    Jean

    Hi Jean,
    Your configuration looks right. Eviction happens lazily and on the client thread - did you wait for 15s+ and invoke any cache method (get/put/size etc) to trigger eviction ?
    For example, attached MyCacheListener.main should print:
    entry foo deleted, isSynthetic:true
    null
    Regards,
    Dimitri<br><br> <b> Attachment: </b><br>coherence-cache-config.xml <br> (*To use this attachment you will need to rename 369.bin to coherence-cache-config.xml after the download is complete.)<br><br> <b> Attachment: </b><br>MyCacheListener.java <br> (*To use this attachment you will need to rename 370.bin to MyCacheListener.java after the download is complete.)

Maybe you are looking for

  • Touchscreen issue - especially bad on games

    I first noticed this on a running game where you have to hold down either the left or right side of the screen to move in that direction. It would usually register the first press, but not that I had held my finger down so I wasnt moving properly. I

  • My iphone contacts won't sync on my home computer

    I sync my iphone at work with the Macbook Pro I use at work. But when I get home, it won't sync with my home Macbook Pro.

  • How to : rownum and order by in select statement

    Say I have a select statement with additional 'order by' clause. The result set I want prepended by the rownum column. But, and here comes the flaw, I want the rownum for the already ordered result set not the unordered. An example: select firstname,

  • Exporting files with keywords

    When exporting files using the export command, only some keyworks will show up in the File info panel (even if I select all). But if I open the same image from Lightroom with the "Edit photo with Photoshop CS-6" all the keywords show up in the file i

  • PDF text issues on BO 4

    We are migrating from SAP BusinessObjects Enterprise XI to SAP BusinessObjects BI Platform 4.1 Support Pack 2 Patch 1. Our Crystal reports were in version 2008. We are having issues with text formating in our PDF documents. For example: lines will ei