CreateChildSymbol, then delete it?

Hello

I'm removing a symbol after I have created. At the beginning of my main script, I can create a symbol with no problems. But try to delete then this symbol is a problem, it won't... It extra guard the same symbol, one under the other (timeline is on a loop). It's on my first image:

sym.createChildSymbol("Food_Spanner", "DropPoint"); 
var food_sym = Food_Spanner.getSymbolElement();

Then about 15 pictures later:

food_sym.deleteSymbol(); //nothing

//so I try this:

sym.getSymbol("Food_Spanner").deleteSymbol(); //nothing
sym.getSymbol(food_sym).deleteSymbol(); //again, nothing

What I'm doing wrong here?

Hi Oliver, it's probably a question of importance. I recommend to put all the functional code on Stage.compositionReady event, then call these functions from anywhere where you need.

Put this code on Stage.compositionReady:

Store your symbol

sym.mySymbol;

sym.createParticle = function() {}

Pull the symbol in the library, add to the scene

sym.mySymbol = sym.createChildSymbol ("Food_Spanner", "Stage");

}

sym.removeParticle = function() {}

delete the symbol

sym.mySymbol.deleteSymbol ();

}

Place this code on frame 1:

sym.getComposition () .getStage () .createParticle ();

Put this code on frame 15:

sym.getComposition () .getStage () .removeParticle ();

Tags: Edge Animate

Similar Questions

Maybe you are looking for

  • Everything slow down on Win8.1 but not on Mac

    A few days ago my TBird on my Win8.1 machine has slowed to a crawl. It takes forever to download emails, to load the emails to read, send emails on the junk e-mail folder, etc. Sometimes I get an error message saying that a script is not working and

  • NSIS error

    I get a NSIS error when I connect to the internet.  I didn't download anything unless is is a Microsoft or updated Norton Internet security 2009 auto.  I would like a way to stop this message.  I am running Windows XP on this computer.  I have tried

  • Update for AMD Radeon 7650 m

    Hello I am running Win 7 Professional x 64 and AMD Radeon 7650 s m on HP ProBook 4540. For my laptop I use the drivers supplied only by HP but more recent drivers are from may 2012. Do you planing to update? When can I expect this? Can I use newer dr

  • Smartphones Telenav blackBerry

    TeleNav will work with my AT & T 9860? It is not listed in the list of devices.

  • Failed to connect to the ESSBASE server & opmn was able to start

    Dear all,I couldn't connect to Essbase server and a service to opmn works not as well. Hard at this issue not accessible planning application, kindly help us this is very urgent and very crucial for us.Here are the controls and exit (Please find logs