Hey guys, got a problem with my pages in flash. So i created 5 pages, each of which contains several movie clips (text, graphics, forms, etc). There is one specific page however that contains autogenerated content via. sprites. If i happen to land on this page, the sprites will appear, but when i transition to another page, they are still there except for the non-sprite stuff (disappear). Im ripping my hair out on this one, i managed to get a few of the sprites to remove but some are still appearing. Below shows the layout of the one thats not being removed;
var container:Sprite = new Sprite();
//loop places several "item" in this container sprite and a scroll bar
var item:myItem = new myItem();
var sb:customScrollBar = new customScrollBar();
container.addChild(item);
container.addChild(sb);
So we are now on this page where container and items are generated, i then click a button to move to say the home page and the container still stays there.
Here is what i tried:
removeChild(container); //nothing, this was called from another keyframe where the container was not generated from
stage.removeChild(container); //nothing
Here are the errors. ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
Note* I also have several buttons that were also generated NOT inside the container like below and they worked when i ran removeChild(button1) so i dont know why the container one is not working.
FLA (cs4) http://www.4shared.com/file/2swJjnNm/mevame.html
Preview http://bodog-bonuses.com/mevame/