QUOTE(kiroukou @ Jul 26 2007, 02:08 PM)

Hi
Well
no, the new AS3 possibilities make this a bit different. 3.0 and 2.0
versions requires to call yourself the world3D.render method in
comparison of the old 1.X
So now you can specify yourself the way to render the workd, with a Timer, with the stage enterrframe event.
Look at the test folder on the svn to see how I do this.
Thomas
Yep, I got that and automatic spinning works pretty good using Timer.
I
also have a mouse listener that wants to update the model for mouse
drag events at same time as spinning. Seems like the mouse dragging is
low priority compared with spinning, so mouse dragging is less
responsive. I was hoping to try the approach in Petit's tutorial to see
if I got better responsiveness.
In my code I have something like the following. Can you suggest any other approach?
-- Russell
CODE
{
// .....
this.addEventListener(
MouseEvent.MOUSE_DOWN, myMouseDown );
this.addEventListener( MouseEvent.MOUSE_UP, myMouseUp );
this.addEventListener(
MouseEvent.MOUSE_MOVE, myMouseMove );
// .....
}
private function myMouseDown( event: MouseEvent ): void {
mouseDragging = true;
// initialize dragging .....
}
private function myMouseMove( event: MouseEvent ): void {
if (mouseDragging) {
//
modify rotation params etc.....
world.render();
}
}
private function myMouseUp( event: MouseEvent ): void {
mouseDragging = false;
}
Oh.
I think I get it. You suggest I place the code that changes the 3D
model into the timer event function. Similar idea to Petit's tutorial
where render event function was used. Right?