Hi guys I’m a total noob to away3D, can you guys help me.
I’m trying to play a vid on the plane using away3D4 but it doesn’t fire up. it just shows a white box on the stage.
Here is my code
public final class ModelLoader extends ARAway3D4Container
{
//engine variables
private var _mesh:Mesh;
private var _geom:PlaneGeometry;
private var _texture:TextureMaterial;
private var vidTexture:VideoTexture;
private var staticLightPicker:StaticLightPicker;
//scene objects
private var advancedMethod:Boolean = false;
//conatiner
private var container:ARAway3D4Container;
private var _player:IVideoPlayer;
private const _video:String = "../embeds/neuron_vid.avi";
private var videoMaterial:TextureMaterial;
private var videoPlane:Mesh;
public function ModelLoader() {
super();
createVideoPlane();
}
private function createVideoPlane():void{
var videoTexture:VideoTexture = new VideoTexture(_video, 1024, 512, true, false);
_player = videoTexture.player;
videoMaterial = new TextureMaterial(videoTexture);
videoPlane = new Mesh(new PlaneGeometry(1024, 512, 1, 1), videoMaterial);
videoPlane.rotationX = 90;
addChild(videoPlane);
_player.play();
}
}
}