All pastes #898806 Raw Edit

sui

public text v1 · immutable
·published 2008-02-10 17:00 UTC
rendered paste body
// The problem is that i dont know how to apply the phong material to the sphere


// In my public class extending sprite

 		[Embed(source="../assets/aarde.jpg")] private var aardeTexture:Class;
 		[Embed(source="../assets/aarde_bump.jpg")] private var aardeBumpTexture:Class;



// in my init3d

        	var aardeMaterial:Bitmap = new aardeTexture() as Bitmap;
        	var aardeBumpMaterial:Bitmap = new aardeBumpTexture() as Bitmap;
        	var aardeTexture:PhongShader = new PhongShader(hetLicht, 0xFFFFFF, 0x000000, 0, aardeBumpMaterial.bitmapData, aardeMaterial.bitmapData);
        	
        	var deAarde:Sphere = new Sphere(aardeTexture, 200, 24, 24); // this line is the problem, the 'aardeTexture' isnt accepted