Quantcast
Channel: Adobe Community : All Content - All Communities
Viewing all articles
Browse latest Browse all 290743

Can't delete all elements on stage and "clear a scene"

$
0
0

Hi folks!

 

 

I've got a problem using the deleteSymbol() Api function. It works only for the... symbols, but not for the element.

 

In this online example, the moving gray rectangle is a symbol and the "some text" is a text-element Div: http://www.terredainventare.it/delete/MyDeleteSymbols.html

 

Here are the project files: http://www.terredainventare.it/delete/DeleteSymbols.zip

 

 

If you click "Cleare etc" only the Symbol disappears.

 

Here's the code I've tried at the event "click":

 

sym.getSymbol("Anim").deleteSymbol("Anim");

sym.getSymbol("Text").deleteSymbol("Text");

sym.$("Text").remove();

 

 

One more question: what if I want delete all the elements that are now on the stage (symbols + elements)?

 

I've tried:

 

sym.getComposition().getStage().getChildSymbols().deleteSymbol();

 

but it doesn't work.

 

 

And, if I can "Clear the scene" to go to another "scene" in where I put some other animations and text, how can I do that? How can pratically create a new "scene"?

 

 

Many thanks in advance for your precious help!

 

 

Davide


Viewing all articles
Browse latest Browse all 290743

Trending Articles