Hi all,
I am using papervision3d as my 3d engine to create anaglyph objects. I want to load 3d objects in diffrent canvas and displayed it based on the selection.
for that i created a list when the list changes using the mouse click the object also changes.i am adding the object in the resourcemanager class. so i load the resourcemanager class to a ui component . but all the objects are loading in to the same scene and it's behind the component
i give the function
private function selectHandler(event:Event):void {
uploadFile.text = _fileReference.nativePath;
dp.addItem(_fileReference.name);//dp is the data provider to the list
extension = uploadFile.text.substr(uploadFile.text.length - 3, 3).toLowerCase();
if ( extension == "md2" ) {
filetype = 0;
} else if ( extension == "obj" ) {
filetype = 1;
} else if ( extension == "dae" ) {
filetype = 2;
} else if ( extension == "3ds" ) {
filetype = 3;
} else if ( extension == "kmz" ) {
filetype = 4;
}
myComponent =new ResourceManager(_fileReference.nativePath, perWidth(79), perHeight(80), filetype);
myComponent.x = 0;
myComponent.y = 0;
for ( i = 0; i < objectArray.length; i++ ) {
objectArray[i].visible = false;
}
currentObject++;
initViewer.addChildAt(myComponent,currentObject);//here i am adding to the component
list.selectedIndex = currentObject;
objectArray.push(myComponent);
}
can anyone help me??????please...