On 22/04/2011 18:35, Steve Abaffy wrote:
Quick updateFunction{ Var Mort: MovieClip = new Mort(); Try{ removeChild(Mort); }catch(e:Error){ // Do nothing; } addChild(Mort); } This function is called multiple times and each time it adds the child Mort, but I want to remove the one placed there previously, it works if I add the two lines right after each other as in the previous email but I really need it work more like this.
As has already been pointed out, your variable name is the same as the class name, so I'm not sure why the compiler doesn't throw wobbly.
Never name instance variables beginning with a capital letter.
_______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

