ah, i miss this line, try to remove view.mouseEnabled = false;
or set to true hth On 01/04/2010, Moley <[email protected]> wrote: > Hey, > I tried switching .canvas to .layer , same effect (in the above code) > > Commenting out the .layer or .canvas lines makes the problem go away, > so it seems to be an issue with these? > > On Apr 1, 9:50 pm, katopz <[email protected]> wrote: >> canvas must defined each cube like mainCanvas1, mainCanvas2 >> if you want to use shared sprite, do try .layer instead >> >> hth >> >> On 1 April 2010 17:42, Moley <[email protected]> wrote: >> >> >> >> >> >> > Oh yes here is a class that reproduces the error mouse over the cubes. >> > I'll upload a swf as well >> >> > package { >> > import away3dlite.core.render.Renderer; >> > import away3dlite.templates.BasicTemplate; >> > import away3dlite.cameras.lenses.OrthogonalLens; >> > import away3dlite.materials.WireColorMaterial; >> > import away3dlite.materials.BitmapMaterial; >> > import away3dlite.materials.MovieMaterial; >> > import away3dlite.primitives.Plane; >> > import away3dlite.primitives.Sphere; >> > import away3dlite.primitives.Cube6; >> > import away3dlite.sprites.Sprite3D; >> > import flash.display.Bitmap; >> > import flash.display.Sprite; >> >> > [SWF(backgroundColor="#ffffff",frameRate="30",quality="MEDIUM",width="520", >> > height="600")] >> > public class Reproduce extends BasicTemplate { >> > private var mainCanvas:Sprite = new Sprite(); >> > override protected function onInit():void { >> > debug = false; >> > view.mouseEnabled = false; >> > view.addChild(mainCanvas); >> >> > var cube:Cube6 = new Cube6(new >> > WireColorMaterial(), >> > 25, 50,25); >> > cube.canvas = mainCanvas; >> > cube.y = -25; //half of height >> > cube.x = -50+(25*.5); >> > var cube2:Cube6 = new Cube6(new >> > WireColorMaterial(), >> > 25, 50,25); >> > cube2.canvas = mainCanvas; >> > cube2.y = -25; //half of height >> > cube2.x = cube.x+(25); >> >> > var plane:Plane = new Plane(new >> > WireColorMaterial()); >> > plane.canvas = mainCanvas; >> >> > view.scene.addChild(plane); >> > view.scene.addChild(cube); >> > view.scene.addChild(cube2); >> >> > renderer.sortObjects = true; >> >> > camera.lookAt(plane.position); >> > } >> >> > public function Reproduce() { >> > super(); >> > } >> >> > } >> >> > } >> >> > On Apr 1, 9:35 pm, katopz <[email protected]> wrote: >> > > hmm, not sure how can i reproduce this? can you provide some code plz? >> >> > > On 01/04/2010, Moley <[email protected]> wrote: >> >> > > > Started using a canvas (for my main objects) to appear above >> > > > Sprite3D's and got this when i rolled my mouse over the scene. >> >> > > > RangeError: Error #1125: The index 0 is out of range 0. at >> > > > away3dlite.core.render::Renderer/collectPointFace()[/Users/ >> > > > moosecrumpet/Documents/Experiments/testAway3D/src/away3dlite/core/ >> > > > render/Renderer.as:184] >> > > > at >> > > > away3dlite.core.render::BasicRenderer/getFaceUnderPoint()[/Users/ >> > > > moosecrumpet/Documents/Experiments/testAway3D/src/away3dlite/core/ >> > > > render/BasicRenderer.as:232] >> > > > at >> > away3dlite.containers::View3D/fireMouseEvent()[/Users/moosecrumpet/ >> > > > Documents/Experiments/testAway3D/src/away3dlite/containers/View3D.as: >> > > > 253] >> > > > at >> > > > away3dlite.containers::View3D/onRollOver()[/Users/moosecrumpet/ >> > > > Documents/Experiments/testAway3D/src/away3dlite/containers/View3D.as: >> > > > 218] >> >> > > -- >> > > katopzhttp://www.sleepydesign.com >> >> > -- >> > To unsubscribe, reply using "remove me" as the subject. >> >> -- >> katopzhttp://www.sleepydesign.com > -- katopz http://www.sleepydesign.com
