Let me know if this helps or is too vague:

1. Make cube with some default Bitmapmaterial like this:

mycube.material=new BitmapMaterial(new BitmapData(128, 128, false,
0xFF0000));

2. Load your jpg with URLRequest add contentLoaderInfo listener.

3. On listener COMPLETE replace the bitmap something like this:

mycube.material.bitmap=event.target.content.bitmapData;

Let me know if it makes sense. There may be a shorter way, but this is how I
am used to doing it.

-Pete



On Wed, Jul 1, 2009 at 3:43 PM, away3dfan <[email protected]> wrote:

>
> Absolutely.  I want to create a cube in actionscript similar to the
> following (not tested for errors):
>
> var c = new Cube({ width:300, height:300, depth:20} );
>
> Then I want to assign an image to one of the faces, the image should
> rest in a URL, say, this one:
> http://img.timeinc.net/time/photoessays/2008/world_water/water_01.jpg
>
> Additionally, as I mentioned before, I would like to be able to apply
> SWF files in the same way, but that's not as important, and I don't
> know if it's even possible under away3d.
>
> On Jul 1, 2:55 pm, Peter Kapelyan <[email protected]> wrote:
> > Can you tell us exactly what you are trying to do, also I can try to
> help.
> >
> > For instance >
> >
> > Make cube,
> > Apply Bitmap Material
> > Change Bitmap Material
> >
> > etc?
> >
> > Not quite sure what you mean by native as3 object jpgs (the ones in the
> > library?)
> >
> > -Pete
> >
> >
> >
> > On Wed, Jul 1, 2009 at 2:48 PM, away3dfan <[email protected]> wrote:
> >
> > > Thanks for your time.
> >
> > > I've been on the api pages including
> > >http://www.away3d.com/livedocs/away3d/loaders/data/MaterialData.html
> > > trying half a dozen different loaders, flash.display.Loader,
> > > away3d.loaders.data.MaterialData, etc., and looking at over 9000
> > > tutorials trying to intuit how it's done, but I didn't come up with
> > > anything specific to native as3 object jpgs (or other formats) applied
> > > directly to polygons, and for the life of me I can't figure out how to
> > > load one of these materials (or swfs) into away3d in this way.
> >
> > > Ideally, I would like to do both external images and reflected data
> > > streams (such as youtube) which may or may not be possible.
> >
> > > But for now, I'd be happy with simple jpg importing.
> >
> > > Appreciate any help.
> >
> > --
> > ___________________
> >
> > Actionscript 3.0 Flash 3D Graphics Engine
> >
> > HTTP://AWAY3D.COM
>



-- 
___________________

Actionscript 3.0 Flash 3D Graphics Engine

HTTP://AWAY3D.COM

Reply via email to