Hi, i'm working in a 3D Museum, width a collada object, all modeling
in maya in the same dae file, i have 42 planes and the room,
texturized by jpg's, its working good with static images, but i want
add some events to the planes. I tried change jpg textures to
movieMaterial and it's work, but performace it's affected even though
movieClips without animation only static image,  cpu's goes to 100%
and the framerate down to 5 fps, it's to slow.

I tried change textures to MovieClip only when mouse over o click in
the plane and change to static jpg image when mouse out, but i can't
add a MouseEvent3D inside geometryLibrary or materialLibrary.

This a part of code:

//Funcion para crear el Lobby
public function creaLobby ():void {

   //Carga el modelo 3D en formato Collada-DAE
   lobby = Collada.load("MuseoVirtual/modelos/alobby.dae");

   //Se agrega un Listener para saber cuando el modelo ha sido
cargado, esto ocurrirá
   //cuando modelo y texturas carguen completamente
   lobby.addEventListener(Loader3DEvent.LOAD_SUCCESS,lobbyCargado);

   //Se agrega  el modelo a la escena
   visor.scene.addChild(lobby);
   visor.mouseEnabled=true;

   //Inicializa posición y escala del Lobby
   lobby.mouseEnabled = true;
   lobby.visible=true;
   lobby.scale(70);
   lobby.y=-49;
}

//This is a test tried add MouseEvent3D using a geometry from
geometryLibrary
public function lobbyCargado(evento3d:Loader3DEvent):void {
 
lobby.geometryLibrary.getGeometry("pantalla1").geometry.addEventListener(MouseEvent3D.MOUSE_UP,cambiaTextura);
}

//Not work
//This is a test tried add MouseEvent3D using a meterial from
materialLibrary
public function lobbyCargado(evento3d:Loader3DEvent):void {
 
lobby.materialLibrary.getMaterial("pantalla1").material.addEventListener(MouseEvent3D.MOUSE_DOWN,cambiaTextura);
}

public function cambiaTextura(evento:MouseEvent3D):void {
    //cuadro it's a class from a movieClip loaded in a stream.
    pMaterial= new MovieMaterial (cuadro as MovieClip);
   pMaterial.interactive=true;
 
lobby.materialLibrary.getMaterial("pantalla1").material=pMaterial;*/
}


Any help i want add a MouseEvent3D to geometry "pantalla1" and it's
inside in the GeometryLibrary from collada object.

Thanks

Reply via email to