Can anyone help me out on this? Thanks
On May 26, 5:33 pm, colouredfunk <[email protected]> wrote: > Hi, > > I have a MovieClip with several buttons on that I want to add into my > 3D scene. At the moment I'm using a Plane, but as it's always facing > the camera it makes sense to use a Sprite3D or MovieClipSprite, to > save some memory (it's quite a big MovieClip) > > But when I swap over from the Plane, it doesn't seem to pick up the > interaction on the MovieClip for some reason.. It is even possible? or > am I barking up the wrong tree? > > Actually, just tested it again, and I get an error > > [Fault] exception, information=TypeError: Error #1009: Cannot access a > property or method of a null object reference. > MovieMaterial.as > > private function onMouseMove(event:MouseEvent3D):void > { > x = event.uv.u*_renderBitmap.width; > y = (1 - event.uv.v)*_renderBitmap.height; > > ---Here is my code-- > > _cityBG = new CityScape() > _cityBG.addEventListener(CityScape.FLAG_CLICK, onFlagClick); > _cityBG.addEventListener(CityScape.POPCLOSE_CLICK, resetCam); > _cityBG.scaleX = _cityBG.scaleY =1 > var mat2:MovieMaterial = new MovieMaterial(_cityBG) > mat2.smooth = true; > mat2.interactive = true; > > var test:Sprite3D = new Sprite3D(mat2, 866, 440) > test.x = 127 > test.y = 11 > test.z = -133 > _scene.addSprite(test); > > Kaan
