This is G o o g l e's cache of http://www.flashsandy.org/forum/lofiversion/index.php/t599.html as retrieved on 13 Aug 2007 06:29:19 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:DO2Q6PV8xzIJ:www.flashsandy.org/forum/lofiversion/index.php/t599.html+site:www.flashsandy.org+index.php&hl=en&ct=clnk&cd=47


Google is neither affiliated with the authors of this page nor responsible for its content.
These terms only appear in links pointing to this page: index php

reast
I see you've got RENDER event dispatching commented out for now within World3D.render()

What's the thinking about how mouse events should be handled within Sandy 3.0?

The tutorial for 1.x (http://www.petitpub.com/labs/media/flash/sandy/interactions.shtml) suggests using render event listeners for updating the model - will that still be the basic idea?
kiroukou
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
reast
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?
Petit
QUOTE(reast @ Jul 26 2007, 09:45 PM) *

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?

Yes, that sounds like a good idea!
You can't have the call to world.render() dependent on the mouse move ( or drag ).
reast
QUOTE(Petit @ Jul 26 2007, 03:01 PM) *

Yes, that sounds like a good idea!
You can't have the call to world.render() dependent on the mouse move ( or drag ).


Cool! I get a much better mouse / model response using this approach - thanks guys!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2007 Invision Power Services, Inc.