How to get a dynamically created symbol delete itself-click?

Here is the configuration...

I want to have a dynamically created symbol to appear on click of a hotspot. In this case, you click on a thrilling hotspot and a popup appears.

Here is the code I use for this.

Create an element in the instance of a symbol as a child of the given parent item

var mySymbolObject = sym.createChildSymbol ("gardern_toxins_popup", "stage");

So we have the symbol 'garden_toxins_popup' in my library placed dynamically on the page. I would like to assign an action to the pop-up itself which allows you to remove the symbol from the stage to click.

I feel stupid for not be able to understand this. I tried iterations of this piece of code...

Download the scene compared to the level of the composition, get the symbol

sym.getComposition () .getStage ().getSymbol("garden_toxins_popup").delete ();

.. .but it does not work.

So I tried to think as if I was back in Flash and tried the following...

this.parent.removeChild (this);

But no joy on that as well. Is there something that I have not touched on in this logic, or I go about it the wrong way? Thank you!

Sorry I meant: sym.deleteSymbol ();

In symbols, you must:

sym.getComposition () .getStage () .play (0);

sym.deleteSymbol ();

You can see all the code in the code window.

Tags: Edge Animate

Similar Questions

  • iframe on a dynamically created symbol

    Hello

    -J' have a button that creates a dynamically. That's ok

    - then I pass this symbol with TweenMax. It's Ok, I tested it.

    - and finally, I want to load an external URL in this symbol. It does not work.

    The problem is, I think, that I n 't know how to approach this dynamically created symbol.

    This is my code:

    externalURL var = "portfolio/FFD.html";

    var mywrapper = $(sym.createChildSymbol("wrapper","Stage").getSymbolElement ());

    var wrapperMove = TweenMax.to (mywrapper, 2, {css: {top: "2500", left:"0"},ease:Sine.easeOut});}})

    SYM. $("mywrapper") .html ("< iframe src ="+"externalURL + height = 100% width = 100% > < / iframe >");

    Thanks for any help

    Hi Joel

    It worked like that...;

    var mywrapper = sym.createChildSymbol ("wrapper", "Stage");

    var wrapperMove = TweenMax.to (mywrapper.getSymbolElement (), 2, {css: {top: '2500px", left:"0px"},ease:Sine.easeOut});}})

    mywrapper.getSymbolElement () .html ("");

    Somehow it didin'tt as the externalURL variable... don't know why...

    I got to understand it.

    Thanks for your help

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

    Hello world

    I'm trying to get the id of a dynamic created symbol library.

    When you dynamically create the symbol directly on the stage (or the level of the composition), there is no problem.

    But I can not function when you create the symbol inside another symbol.

    A few examples using '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 a SYMBOL OTHER

    var m_item = sym.createChildSymbol ("m_item", sym.getSymbol("holder").getSymbolElement ());

    var symbolChildren = sym.getSymbol("holder").getChildSymbols (); / / I use this maybe wrong?

    console.log (symbolChildren.Length) / / returns 0 if can't ID is

    ' USE '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: #eid_1391854141436 div

    / / Inside a SYMBOL OTHER

    var m_item = sym.createChildSymbol ("m_item", sym.getSymbol("holder").getSymbolElement ());

    console.log (sym.getSymbol("holder").aSymbolInstances [0]); / / Error Javascript in the event handler. Type of event = element

    In this post http://forums.Adobe.com/message/5691824 is written: "mySym.aSymbolInstances will give you a table containing all the 'names' when you create symbols"

    Would be - this only works on the scene / composition level only and not inside a symbol?

    The following methods to obtain the same are indeed possible, but I do not simply want to use them in this case:

    (1) storing a reference to the symbol created in a table and call it later by index.

    (2) giving the elements an ID manually on the creation and use of document.getElementById () thereafter.

    I can't believe that this is not possible. I am probably missing something here.

    Forgive me that I am a newbie using Adobe Edge!
    I really hope that someone can help me here.

    Anyway, thnx in advance people!

    Kind regards

    Lester.

    OK, I solved my problem by using the (simple) code below.
    I guess that 'getChildSymbols()' and 'aSymbolInstances' only works on stage / level of the composition.

    Just thought I'd share this to everyone. Peace!

    var m_item = sym.createChildSymbol ("m_item", sym.getSymbol("holder").getSymbolElement ());

    $.each (sym.$("holder").children (), function (index, obj) {}

    Console.log ($(sym.$("holder").) ([Index] Children()) .attr ('id'));

    });

  • address dynamically created symbols

    I don't know what is the best way to deal with a specific symbol dynamically created because I don't see in the dashboard API in any way to get the name of the symbol instance. The method . getSymbol() would be the best way to do it, but it takes the name of "instance" symbol and I don't know which one it is. When I use . createChildSymbol() I just pass the name of 'type' symbol and the name of the element parent to put inside but nothing about the symbol instance name that is created. The method . getChildSymbols() doesn't help much because it gets "all" direct children instances are, and I have more of an and of different types.

    I need to get one specific symbol among others that I created dinamcally, so how do I do it better?

    I think on the use of . 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 symbols children recovered. I now have a subset of the 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 setting of index-z I spent when I created the symbols using the . createChildSymbol().

    Another option would be to 'save' the manager returned to each symbol created with . createChildSymbol() in an object like this {symbol: handler, name: 'no name', created: ' date/time',...} and save them in an array of objects.

    All the best ideas?

    I found something in http://www.edgedocks.com/edgecommons#anchor_edgecommons_21. This guy did a getSymbolName function, which is exactly what we need to solve this problem.

  • How to reference a dynamically created MovieClip from an another MovieClip?

    Hello

    I would be grateful for the pointers to the following problem:

    I can't reference dynamically created MovieClips (links in a panel side on a Flash site, created from a XML file) from the current MovieClip (the selected link).

    I want to freeze the MovieClip/link to the mouseOver State, once it has been clicked - this part works. When a new MovieClip/link is clicked on, I would like to release the previously clicked on the link to the mouseOver State, which is what I have so far been unable to do.

    My problem seems to refer to the previous link/MoveClip. I used the statement (MovieClip (this) .name) route trace to determine that the clips are named item0, item1, item2 and so on. However, I was unable so far to reference the previous item so far. I tried to follow the route to the MovieClip on the stage and also essaye.item0.gotoandstop MovieClip (parent) and a lot of other different permutations, but nothing helped. It's the fact that they seem to be in a container called "panel", which is defeat me.

    Here's a live version that I downloaded, what could explain the problem better. Click on "UBER EACH" in the menu bar to access the page in question. It is the links on the left side (history, team Unser, etc.) who are the problem. You will see that once they were clicked, they stay in their mouseOver State.

    This is the code in question on the fla file, which is a file that I did not create myself. The parts in black work very well; It's the Red pieces there the rub:

    ***********************************

    import flash.display.MovieClip;

    panel.buttonMode = true;

    var: lang: uint = 1;

    var url_Link:String = MovieClip (root).program.websiteXML .language [lang] [MovieClip (root).program.linkPage].pages.titlePage.texts.pageList.txt [XT].@link numT;

    var urlPage:Number = number (MovieClip (root).program.webs iteXML.language [lang].pages.titlePage [MovieClip (root).program.linkPage].texts.pageList.tx t[numTXT].@linkPage);

    var request: URLRequest;

    var linkIndex:uint;

    var lastClickedLink:MovieClip; //This is supposed to store the last link that has been clicked - it does not work  

    panel.addEventListener (MouseEvent.CLICK, clicLink);

    panel.addEventListener (MouseEvent.ROLL_OVER, mouseOverLink);

    panel.addEventListener (MouseEvent.ROLL_OUT, mouseOutLink);

    function mouseOverLink(event:MouseEvent):void {}

    MovieClip (this) .gotoAndPlay ('s1');

    }

    function mouseOutLink(event:MouseEvent):void {}

    if(numTXT!== (linkIndex-1)/5) { State mouseOver of //freezes so this is the link for the current page

    MovieClip (this) .gotoAndPlay ('s2');

    }

    }

    function clicLink(event:MouseEvent):void {}

    var linkpage:uint =. MovieClip program.linkPage (root);

    If {(url_Link)

    request = new URLRequest (url_Link);

    navigateToURL (request);

    } else {}

    linkIndex = numTXT * 5 + 1;

    if(linkpage == 1) {}

    MovieClip (root).chPages.cont.page_about_mc.page3Tu rner_mc.gotoAndStop ([linkIndex]);

    } ElseIf (linkpage == 2) {}

    MovieClip (root).chPages.cont.page3_mc.page3Turner_ mc.gotoAndStop ([linkIndex]);

    }

    lastClickedLink.gotoAndPlay('s2'); / / This is supposed to release the clicked the link previous it is State mouseOver - does not work 

    lastClickedLink = MovieClip (this) .name; //this is supposed to set the new link as the last link clicked after that was released of her is State mouseOver - does not work   

    }

    }

    ***********************************

    If anyone can help, that would be great.

    What you might be after for this line is to use:

    lastClickedLink = MovieClip (event.currentTarget);

    For what you show, the name property of an object is a string, so I expect get you an error regarding trying to get a string to act as a MovieClip when you try to say to gotoAndPlay ('s2').

  • I disabled toolbars. Now I can not understand how to get back them. Have no 'view' click.

    I went to view/toolbars and disabled my toolbars. Now I can not understand how to get back them. Have no 'view' to click on.

    In Firefox 3.6 and later Windows, you can hide the menu bar on "view > toolbars" or via the contextual right click menu on a toolbar.
    Press F10 or press and hold the Alt key to bring up the menu bar temporarily.
    Go to "view > toolbars", right click on the menu bar, or press Alt + V T to select to show or hide toolbars (click on an entry to switch from the State).

    See also what happened to the file, edit and view menus? and http://kb.mozillazine.org/Toolbar_customization

  • How to control dynamically created symbols

    Hi, I'm new on board, but thanks to adobe forum which helped me a lot.

    I try to use ".createChildSymbol" to my library symbols to my stage. Each symbol, so I have a label OUT, whenever a new symbol is called by a particular button, the last of them is played and new label appears in the same place.

    It is easy for the two symbols, and I did not need to put any drive for them. But I nearly 180 symbols and a menu of buttons to call them, so each button must play OUT the current symbol label and also plays a new and do it like the current one.

    I would really appreciate if someone help me to solve this problem.

    SYM.test = sym.createChildSymbol ("test", "Stage");

    sym.getComposition () .getStage () .setVariable ("current", "test");

    class var = sym.getComposition () .getStage () .setVariable ("current");

    sym.current.getSymbolElement () .css ({position: 'absolute', display: "inline-block", top: 167, left: 91 "});

    Here are the files of project edge of what I did.

    PMFR

    * edit * notice the code in the following locations:

    Stadium/compositionReady

    -Panel actions inside each button symbol

    -Relaxation after the SORTIE_TANGENTIELLE label within the symbols of animations (options1 / option1a_ *)

  • How to get the track changes inserted / deleted text?

    Hello

    I have read the Adobe InDesign CS6 JavaScript Scripting Guide and wrote a JavaScript as below:

    var myChanges = app.documents.everyItem().stories.everyItem().changes;
    var myString = '';
    for (var i=0; i<myChanges.length; i++) {
            var myChange = myChanges[i];
            myString += myChange.userName + '\t';
            myString += myChange.date + '\t';
            myString += myChange.changeType + '\n';
    }
    alert(myString);
    

    My script can get the username, date and change the type.

    But the guide does not cover on how we can get him insert / delete changes?

    Thank you very much!

    The lines I wrote above deleted content work.

    Your problem is that not remove anything to show him because you started to follow the story of its creation.

    If you first create a story and then start tracking it and add, remove etc. your will see the scripts to get also deleted ones.

  • Recycle bin corrupted, how to get pictures back I accidentally deleted

    I accidentally deleted photos & I cannot get them using the Recycle Bin, is there anything else I can try. System Restore could not do either.

    How to recover deleted files.

    http://www.ehow.com/how_2317458_recover-deleted-images-computer.html

    Visit undeleteplus.com

    http://www.undelete-plus.com/

    Good luck.

  • How to get rid of sending: symbol of Red Cross missing image in Internet Explorer?

    See application example and go to the imgclick page.

    https://Apex.Oracle.com/pls/Apex/f?p=13418

    workspace: imagetest_ws

    username: guru

    password: meditation

    Compare the images column img3 with IE and Firefox. In Firefox, some cells are empty and are not clickable, while in IE there is a red cross which is clickable.

    1. I want to warn the user by pressing the image, if there is no image.
    2. Also, I don't want to see the Red Cross in any browser.

    Y at - he ordered Apex how to solve this problem?

    rgrds Paavo

    Hello

    You can use the value of the column hidden as the link text and url link.

    That lets spawn you the link text and link url. Witch you create not sure if there is not image.

    And combined with the protection of session state, user cannot forge the URL and get in to the target page.

    Or put on the JavaScript page to run when loading the Page

    $("img").error(function(){
            $(this).parent("a").remove();
    });
    

    This will remove the link anchor for broken images tag. I'm not sure it works for all browsers.

    I have add this to your example.

    Kind regards

    Jari

  • How to get back on the box "delete"?

    Hi guys,.

    I just use the feature "migrate to an interactive report. After that, the box went that is used to specify the rows to delete. A copy of the region is marked as '' disabled '' and the box is still there, but is not in the newly created region. Without this box, my page has no way to delete lines. How can I add the checkbox of new interactive report region? I prefer not to re - create the page from scratch.

    Thank you
    Kim

    P.S. I use Apex 4.1 and Oracle 11 g xe - running on Windows 7.

    Oh my, you bet, there is a field "Number of lines" on your attributes of report by virtue of the updated section on page Pagination controls this.
    You will see not the report change immediately because the preference is cached for your session. But log out and back in and you will see the report adjust.

    Also... you will notice the Number of Rows (point) field, this one allows you to specify an element that keeps the number of lines to display. You can use a select list with values such as 50, 100, 200, where everything is a big enough number to fit most of the lines that a user wants to see.

    Easy

    Thank you
    -Jorge

  • How to get rid of the symbols Firefox superimposed on the taskbar

    The great symbol of Firefox on the left end of the task bar displays all the current windows - including windows 'private browsing '. This makes it almost useless IMO "private browsing". How can I remove this symbol?

    I noticed there is an extension that allows you to clear the title of the current page, or replace it with the other text. This seems to work as well in private and no private windows, however, it does not appear to have an option to do this automatically in all private windows. Maybe someone can add this feature (the author does not maintain the add-on no more).

    https://addons.Mozilla.org/firefox/addon/page-title-Eraser/

  • How to get the menuitem created in another class

    Hello

    I created a class. on the inside I added a few menus using addMenuItem (Map);

    final class UserInterfaceTouch extends MainScreen
    {
    
     UserInterfaceTouch() {
            super();
    
            LabelField title = new LabelField("Nutiteq SDK Map Sample",
                    LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
    
            setTitle(title);
            addMenuItem(_test);
    
        }
    MenuItem _otest = new MenuItem("Testing, 10, 10) {
            public void run() {
                --- code for doing some thing
            }
        };
    }
    

    How do I acess the menu in the class thus form another class, is it possible to do so.

    Thank you

    SujithRavindran

    Sorry for posting this.

    I got the answer.

  • SS lack of creation, how to get the comments created by the user

    Dear all,

    I have a requirement to create a report for all the Absence pending requests that are applied by the user, I'm able to do all the Absence on hold using the following tables:
    Hr_Api_Transactions
    Hr_Api_Transaction_Steps

    but none of the tables above contains the "comments" that the user typed while creating the absence. The absence is not yet approved.

    Please need your help on this.

    Hello

    Absence details which are not always approved are stored in the HR_API_TRANSACTIONS table. the details are stored in XML format in the column named TRANSACTION_DOCUMENT. You will need to read the XML data for the information of comments. Please find the link below which will provide you with a reference on how to analyze the XML data stored in the HR_API_TRANSACTIONS table.

    http://www.apps2fusion.com/apps-training/apps-functional-documents/AME-sshr/436-parse-XML-hrapitransactions-sshr-HRMS-self-service

    It will be useful. Let me know if you want more details.

    Thank you
    Sanjay

  • How to get the ID of symbol on the edge

    I have a few codes like this:

    function myFunc (name) {}

    var $symbol = sym. $(name);

    I want to do something with $symbol according to their ID card, for example

    $item.appendTo ($symbol);

    then $item will add on the corresponding symbol

    }

    for (var i = 0; i < 10; i ++) {}

    symbol var = sym.createChildSymbol ("MySymbol", sym.$(Stage"));

    myFunc (symbol.getSymbolElement () .attr ('id')); <-does not

    }

    I tried .attr ('id') and it does not appear the id I want. Thanks for help.

    EDIT: actually I want to get the selector inside myFunc

    I think I found the solution:

    function myFunc ($symbol) {}

    I want to do something with $symbol according to their ID card, for example

    $item.appendTo ($symbol);

    then $item will add on the corresponding symbol

    }

    for (var i = 0; i)<10; i++)="">

    symbol var = sym.createChildSymbol ("MySymbol", sym.$(Stage"));

    myFunc (symbol.getSymbolElement ());

    }

Maybe you are looking for