Hi there experts!
I'm a newbie to AS3 and have limited experience in AS2. I'm having a tough time figuring out how to load/unload or addChild/removeChild movie clips dynamically on the main stage using AS3. The numerous tutorials I've come across on google seem to be using external .swf files when load/unloading and I've been able to get addChild/removeChild to work but can't figure out how to unload the previous movieClip before loading a new one. I apologize for the winded explaination.
I need some guidance on the best way to do this and how to make all this work in AS3. Here's what I've managed to create and have in my library.. please note, that I DO NOT have any movie clips on my stage and all instances (except the button movie clips) were set through the linkage property...
nav_mc (global navigation/instance name: nav) which contains:
- home_mc (home pg/instance name: home)
- about_mc (about pg/instance name: about)
- sc_mc (services pg/instance name: sc)
- mission_mc(mission pg/instance name: mission)
and a movie clip for each section of the site ....
and because of this I have one keyframe on my main timeline with the following script. Now, how do i tell my buttons in nav_mc to unload or removeChild from the main stage before loading the new movie clip?
Any help or guidance would be greatly appreciated!!
var navigation:nav = new nav();
var missionPg:mission = new mission();
missionPg.x = 340;
missionPg.y = 247;
navigation.x = 329;
navigation.y = 158;