Hello,
I’m using the Flash CS6 IDE and am trying to set a texture like so:
[Embed(source='textures/floor_diffuse.jpg', mimeType='application/octet-stream')]
var FloorDiffuse:Class;
var planeMaterial = new TextureMaterial(Cast.bitmapTexture(FloorDiffuse));
var _plane:Mesh = new Mesh(new PlaneGeometry(700,700),planeMaterial);
What I get is a long error message followed by a load of junk characters which I assume is the texture.
Error: Can't cast to BitmapTexture: ÿØÿàJFIFÿÛCÿÛC............
at away3d.utils::Cast$/bitmapTexture()
at away3d_test_fla::MainTimeline/frame1()
What is the correct way to embed and cast a bitmapTexture in the Flash IDE?