[Papervision3D] loaded PNG (transparent) as Material: bestPractice?

Merrill, Jason jason.merrill at bankofamerica.com
Mon Feb 22 10:19:46 PST 2010


Ah – cool – I never knew that.

 

 

Jason Merrill 

 

Bank of  America  Global Learning 

Learning & Performance Solutions

 

Join the Bank of America Flash Platform Community <http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx>   and visit our Instructional Technology Design Blog <http://sharepoint.bankofamerica.com/sites/SDTeam/itdblog/default.aspx> 

(note: these are for Bank of America employees only)

 

 

 

 

 

From: papervision3d-bounces at osflash.org [mailto:papervision3d-bounces at osflash.org] On Behalf Of John Brookes
Sent: Monday, February 22, 2010 1:17 PM
To: papervision3d at osflash.org
Subject: Re: [Papervision3D] loaded PNG (transparent) as Material: bestPractice?

 

You can still get the dimensions using bitmapfile
//loadcomplete
e.target.bitmap.width

On 22 February 2010 17:54, Merrill, Jason <jason.merrill at bankofamerica.com> wrote:

Personally, I would only do it that way if I didn't know the dimensions
of the bitmap and wanted to get them from the loader before applying it
to the plane.  In PV3D you can use BitmapFileMaterial to load the
transparent .png and then apply that material to your plane.  It also
supports the LOAD_COMPLETE event so you know when it's finished loading.


_material = new BitmapFileMaterial("myFile.png");
_material.addEventListener(FileLoadEvent.LOAD_COMPLETE,
onMaterialLoadComplete);
var myPlane:Plane = new Plane(_material, 400, 500, 8, 8);

What I do is make the plane's visibility = false until the material is
loaded.


Jason Merrill

Bank of  America  Global Learning
Learning & Performance Solutions

Join the Bank of America Flash Platform Community  and visit our
Instructional Technology Design Blog
(note: these are for Bank of America employees only)







-----Original Message-----
From: papervision3d-bounces at osflash.org

[mailto:papervision3d-bounces at osflash.org] On Behalf Of Lars Schwarz
Sent: Monday, February 22, 2010 12:43 PM
To: papervision3d at osflash.org

Subject: [Papervision3D] loaded PNG (transparent) as Material: best
Practice?

hi all,

this is a simple. i'm just wondering about a "best practice" way to do
it:

i'm loading (transparent) png images from an xml files to use them as
moviematerial
(to remain transparency) for a plane object.

move the bitmap from the loader to an movieclip first (addchild) and
then use that movieclip as
moviematerial, or is there some nicer way to do so? maybe even the
bitmap material does have
transparency support right now?

just dont like the idea to add non visible movieclips to the stage
before i use them as material...
that's why i'm asking.

thanks: lars

_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20100222/266c1132/attachment-0001.html>


More information about the Papervision3D mailing list