ahh it's because of the material, if you change ColorMaterial to a
BitmapMaterial it should work :)


On May 27, 11:14 am, jens lofberg <[email protected]> wrote:
> Hi
> I have as trange problem, it seems like the event.uv don't exists in the
> MouseEvent3D (Away3D 2.5.0)
> trace(event.uv) traces null
>
> Thanks for your help
> jens
>
> This is my class:
> package {
>     import away3d.materials.ColorMaterial;
>     import flash.display.MovieClip;
>     import away3d.primitives.Plane;
>     import flash.events.Event;
>     import away3d.events.MouseEvent3D
>     import away3d.cameras.Camera3D
>     import away3d.containers.View3D;
>     import away3d.containers.ObjectContainer3D
>
>     public class VideoSelector extends MovieClip {
>         private var _getMouse:Plane
>         private var _w:int = 20
>         private var _h:int = 20
>         private var _sizeX:Number
>         private var _sizeY:Number
>         private var _amount:int
>         private var _materialB:ColorMaterial
>         private var _items3D = new ObjectContainer3D()
>         private var _cam:Camera3D
>         private var _view:View3D
>
>         public function VideoSelector () {
>
>         }
>         public function init(videos:XMLList):void {
>             setup3D()
>             _amount = videos.length()
>             _sizeX = _w * _amount
>             _sizeY = _h
>             _materialB = new ColorMaterial(0x123456)
>             _getMouse = new Plane( { z:0, y:0, rotationX:90,
> material:_materialB, width:_sizeX, height:_sizeY , bothsides:false,
> segmentsW:_amount, segmentsH:1 } )
>             _items3D.addChild(_getMouse);
>             _getMouse.addOnMouseMove(mouseMove)
>             _getMouse.x = 0
>             addEventListener (Event.ENTER_FRAME, onEnterFrame);
>         }
>         private function onEnterFrame(e:Event):void {
>             update3D()
>         }
>         // ------------------------------------------------------------ 3D
>         public function setup3D():void {
>             _cam = new Camera3D( { zoom:6, focus:400 } )
>             _view = new View3D( { x:0, y:0, camera:_cam, stats:false} );
>             _items3D = new ObjectContainer3D()
>             _view.scene.addChild(_items3D);
>             addChild (_view);
>         }
>         public function remove3D():void {
>             removeChild (_view);
>         }
>         public function update3D():void {
>             _view.render();
>         }
>         public function mouseMove(event:MouseEvent3D):void {
>             trace('mouseMove: ' + event.uv)
>         }
>     }
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -

Reply via email to