Note that these layers cannot just simply be added to the view after the planes are added to the scene. These layers must all be contained within one clip, I am using an ObjectContainer3D. This way, once these planes are set, I only need to rotate/manipulate these containers rather than having to loop through all of my planes and manipulate them.
My question is, how do you add just the layers ( Sprites ) to ObjectContainers and have them retain their alpha, blendmode etc properties? On Aug 10, 9:42 am, PW <[email protected]> wrote: > I've tried using the layer example. I need my material to be bitmap. > Again I followed the example in the src and tried this. The alpha of > my layer is not being changed. What would I be doing wrong?: > > planesHolder = new ObjectContainer3D(); > bitmapMaterial = new BitmapFileMaterial("images/note.png"); > bitmapMaterial.smooth = true; > // > // > for (var k:int = 0; k < 10; k++) > { > var plane3:Plane = new Plane(bitmapMaterial,73,82); > planes3.push(plane3); > planesHolder3.addChild(plane3); > > } > > // Now I have tried adding layers for each plane like so: > plane3.layer = new Sprite(); > view.addChild(plane3.layer); > plane3.layer.alpha = .2; > // And have also tried adding a layer to the ObjectContainer3D: > planesHolder3.layer = new Sprite(); > view.addChild(planesHolder3.layer); > planesHolder3.layer.alpha = .2; > //In both cases, I later add the planesHolder (ObjectContainer3D) to > the > scene. > view.scene.addChild(planesHolder3); > > On Aug 9, 11:46 pm, katopz <[email protected]> wrote: > > > > > > > > > layer is just Sprite, it should work like expected not thing to do with lite > > btw > > > for more on this you can try canvas > > herehttp://away3d.googlecode.com/svn/branches/lite > > > e.ghttp://away3d.googlecode.com/svn/branches/lite/bin/ExCanvas.swf > > > morehttp://away3d.googlecode.com/svn/branches/lite/bin > > > hth > > > On 10 August 2011 03:18, PW <[email protected]> wrote: > > > > Unfortunately if you reuse that material for multiple planes, they all > > > change. > > > > Is there any way in away3DLite you can target just one particular > > > plane. The layer property doesn't seem to be functioning. > > > > On Jul 14, 12:20 pm, PW <[email protected]> wrote: > > > > I do have a 'hackish' way of doing this in the meantime if anyone > > > > comes across this post although I would still appreciate knowing how > > > > to use the layers in Lite. > > > > > Instead of using a bitmap to texture your plane in away3dlite, you use > > > > a movieMaterial with the bitmap already exported in the swf. Then you > > > > can alter the actual movies alpha: > > > > > yourplane.material.movie.alpha = x; > > > > > Again, I'd rather not have to create swfs for my bitmaps and am > > > > curious how to affect alpha through the layer property. > > > > > On Jul 14, 12:16 pm, PW <[email protected]> wrote: > > > > > > Planes in away3dlite don't have the ownCanvas property unfortunately. > > > > > I have built this in Away3D and using ownCanvas works great for > > > > > setting the alpha. But this needs to be in away3Dlite. > > > > > > Thank you though. > > > > > > On Jul 14, 12:07 pm, Rich Elmes <[email protected]> wrote: > > > > > > > try plane3.ownCanvas=true; > > > > > > > On Jul 13, 4:42 pm, PW <[email protected]> wrote: > > > > > > > > I have a number of planes that are being added to an > > > > > > > ObjectContainer3D. > > > > > > > > // > > > > > > > planesHolder = new ObjectContainer3D(); > > > > > > > bitmapMaterial = new BitmapFileMaterial("images/note.png"); > > > > > > > bitmapMaterial.smooth = true; > > > > > > > // > > > > > > > // > > > > > > > for (var k:int = 0; k < 10; k++) > > > > > > > { > > > > > > > var plane3:Plane = new Plane(bitmapMaterial,73,82); > > > > > > > planes3.push(plane3); > > > > > > > planesHolder3.addChild(plane3);} > > > > > > > > // > > > > > > > > Now I have tried adding layers for each plane like so: > > > > > > > > plane3.layer = new Sprite(); > > > > > > > view.addChild(plane3.layer); > > > > > > > plane3.layer.alpha = .2; > > > > > > > > And have also tried adding a layer to the ObjectContainer3D: > > > > > > > > planesHolder3.layer = new Sprite(); > > > > > > > view.addChild(planesHolder3.layer); > > > > > > > planesHolder3.layer.alpha = .2; > > > > > > > > In both cases, I later add the planesHolder (ObjectContainer3D) to > > > the > > > > > > > scene. > > > > > > > > view.scene.addChild(planesHolder3); > > > > > > > > However, no alpha properties are being applied for any of the > > > planes. > > > > > > > Can someone point to what I'm doing incorrectly please? > > > > > > > > Thanks. > > > -- > > Regards > > ----------------------------------------------------------- > > Todsaporn Banjerdkit, katopz,http://sleepydesign.com > > Away3DLite and JigLibFlash Developer Team
