Hi guys, i have a new problem. Finally i figured out how to export and load awd2 models into flash, i was so happy about it, my project is going good, till now.
The project is about customizable cars with several components which i can choose from comboboxes (bumpers, spoilers, etc)
Successfully managed to load the main body and the first combobox with the front bumpers. If i select bumper_1, it loads all right, if i select bumper_2 it loads over bumper_1, and so on.
Now i learned that there is no unload only dispose, but dispose gets rid of all models on the scene. i could just load the models again, but my problem is that if i do that, i can only load 1 new model at a time.
Here is what my combobox thingy looks like:
private function initComboBox1():void
{
var cbBumperFront:ComboBox = new ComboBox();
this.addChild(cbBumperFront);
cbBumperFront.x = 40;
cbBumperFront.y = 40;
cbBumperFront.prompt = "Front Bumpers";
cbBumperFront.addItem({label:"FrontBumper 1", data:"BumperFront1.awd"});
cbBumperFront.addItem({label:"FrontBumper 2", data:"BumperFront2.awd"});
cbBumperFront.addEventListener(Event.CHANGE, onChange);
function onChange(evt:Event):void {
Parsers.enableAllBundled();
trace("init loader");
loader = new Loader3D(false, null);
loader.load(new URLRequest(evt.target.selectedItem.data));
view.scene.addChild(loader);
}
}
So how do i get rid of bumper 1 if i want to load bumper 2 without getting rid of all the other things? Or how do i keep the data from the combobox, so when i reload the scene, it should reload all the selected items in the comboboxes and not the default ones?
Thanks for the help in advance: Muroko