Hey there all,

Hope everyone is well.

I tried all of the code snippets outlines above bit with no luck for me.

Would it be better if i posted the code i have in full?

It must be something small that i am doing wrong.

Or maybe someone has a example of using movie material as mentioned above of
what i am trying to do with a sphere and do some drawing on it?

Looking forward to your responses.

Cheers
Dan

On Sat, Oct 17, 2009 at 11:15 PM, ben <[email protected]> wrote:

>
> well here is the way workin for me :
> don't only cast the bitmapdata in the material, create a new instance
> var bumpMap:BitmapData=new BitmapData(500,500,true,0x00000000);
> or
> var panoramap:yourpanoramaClass = new yourpanoramaClass(yoursize,
> yoursize);
>
> set it to your material
> var clayMaterial:BitmapMaterial = new BitmapMaterial(panoramap as
> BitmapData);
> do your stuff..
>
> function mouseDraw(e:MouseEvent3D):void {
>        if (Mesh(e.object).material is BitmapMaterial) {
>                var map:BitmapData
> =BitmapMaterial(Mesh(e.object).material).bitmap;
>                        var shape:Shape = new Shape();
>            shape.graphics.beginFill(0x000);
>            shape.graphics.drawRect(0,0,20,20);
>            shape.graphics.endFill();
>                        var m:Matrix = new Matrix();
>                        m.translate(e.uv.u*map.width,(1-e.uv.v)*map.height);
>                        map.draw(shape,m);
>        }
> }
>
> try set your sphere bothsides, see if any difference.
>
> and also, it seems that your scene is only rendered if (!
> cover.visible), so maybe not everytime...
> Don't see anything else...




-- 
Radiceski Darko
University of Wollongong
Australia
SIFE - UOW Chapter - Alumni
CASUAL ACADEMIC STAFF TEACHING - UOW SITACS
(School of Information Technology and Computer Science,University of
Wollongong)
Univeristy of Wollongong - Alumni

Reply via email to