Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

CreateChildSymbol inside of a different symbol

$
0
0

I have spent time looking over the Edge API and I am unable to determine how you would create a symbol inside of another symbol and not the Stage. The examples given in the API are similar, but I can't seem to get them to work.

 

Here is the example I have working so far... there is much more code that is making the location information work, but here is the essential display code:

 

var locatorBoxPosition = sym.createChildSymbol( "locatorBoxSym" , "Stage" ).getSymbolElement();

locatorBoxPosition.css({"position": "absolute",  "top" : yMapLocator, "left": xMapLocator });

 

Right now, this code appears in a click event that is inside of yet another symbol (called "mapSymbol"). It displays the locatorBoxSym just fine, but it is putting it on the "mapSymbol" which is being clicked on and not inside of another symbol (where I woould like for it to appear). The destination symbol where I want locatorBoxSym to appear is not on the "Stage" but is inside of a symbol that is entitled "legendBoxSym" and more specifically, an element named "legendRectangle" that is inside that symbol (if that matters). The "legendBoxSym" is not a child of anything at this time and has no parents except the Stage.

 

How would I make "locatorBoxSym" appear inside of the separate and standalone symbol "legendBoxSym" that appears on the stage?

 

Thanks!


Viewing all articles
Browse latest Browse all 9897

Trending Articles