Hey Fabrice,

Is this how it should look? It seems like the numbers are right, but
its just not showing the updated crosshair on the sphere:

protected function cursorHandler(e:MouseEvent3D):void {

                        crosshairSprite.x = e.uv.u * worldTexture.width;
                        crosshairSprite.y = (1 - e.uv.v) * worldTexture.height;

                        trace(crosshairSprite.x, crosshairSprite.y);

                        earthMat.update();
                }


On May 27, 10:30 am, Fabrice3D <[email protected]> wrote:
> Just add a MouseEvent3D to your mesh and extract uv's from returned  
> event on mouse move. Multiply by width of your map for u, same for y,  
> but y = 1-v * height. Place your cursor to this 2d point. Update  
> material. If map is large, update the clipRect before update.
>
> Fabrice
>
> Sent from an iPhone without Flash
>
> On May 27, 2010, at 17:22, dyc <[email protected]> wrote:
>
>
>
> > It does have code, but the code is basically a script that moves a dot
> > around on the material based on the position of the mouse...
>
> > When the swf runs on its own, there is a crosshair that follows the
> > mouse, is this the proper way to achieve this sort of effect?
>
> > On May 27, 7:35 am, Fabrice3D <[email protected]> wrote:
> >> does your material holds code?  like stop();?
>
> >> also if you do use this material for loops of animation, you might  
> >> want consider AnimatedBitmapMaterial
> >> saves lots of cpu cycles...
>
> >> try otherwize, material.update(); in your enterframe
>
> >> Fabrice
>
> >> On May 27, 2010, at 4:08 PM, dyc wrote:
>
> >>> Hey guys,
>
> >>> I am having trouble getting my MovieMaterial to actually work...The
> >>> SWF I am using works just as I would want it to work on its own, but
> >>> when I make it the material on a sphere, it is not animated...
>
> >>> I have autoUpdate: true.
>
> >>> Am I missing anything else? Can you point me to a good tutorial or
> >>> example that shows it working?
>
> >>> Thanks!
>
> >>> `Scott

Reply via email to