Answered
removeChild help!
ok!
on frame 3 of my swf I import another swf as a child "stage.addChild(carmenu)"
everything works perfect!
but i have a button in frame 3 that gets me back to frame 2 (in case the user misses something and wants to recheck)
So if the user goes back to frame 2 he has the "carmenu" loaded on screen which is bad LOL, so on frame 2 I added a script saying "stage.removeChild(carmenu)"
It works fine but i get the error " TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/removeChild()
at producto10_fla::MainTimeline/frame3()"
i figured thats because the first time i get to frame 2 the carmenu.swf hasn't been loaded yet so its actually inexistent I guess to avoid that error from appearing in the output i have to add a script to say that if child(carmenu) is loaded then "stage.removeChild(carmenu)"
but i have no idea how! any ideas?
Thanks in advance!!
on frame 3 of my swf I import another swf as a child "stage.addChild(carmenu)"
everything works perfect!
but i have a button in frame 3 that gets me back to frame 2 (in case the user misses something and wants to recheck)
So if the user goes back to frame 2 he has the "carmenu" loaded on screen which is bad LOL, so on frame 2 I added a script saying "stage.removeChild(carmenu)"
It works fine but i get the error " TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/removeChild()
at producto10_fla::MainTimeline/frame3()"
i figured thats because the first time i get to frame 2 the carmenu.swf hasn't been loaded yet so its actually inexistent I guess to avoid that error from appearing in the output i have to add a script to say that if child(carmenu) is loaded then "stage.removeChild(carmenu)"
but i have no idea how! any ideas?
Thanks in advance!!