Video not playing.

Software: Away3D 4.x

consoul, Newbie
Posted: 18 January 2013 12:08 PM   Total Posts: 2

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(_video1024512truefalse);
   
_player videoTexture.player;
   
videoMaterial = new TextureMaterial(videoTexture);
   
videoPlane = new Mesh(new PlaneGeometry(102451211), videoMaterial);
   
videoPlane.rotationX 90;
   
addChild(videoPlane);
   
_player.play();
  
}
 }

 

   

Qbrain, Member
Posted: 18 January 2013 04:26 PM   Total Posts: 92   [ # 1 ]

dunno for sure, but don’t you need to create a new instance for the videoplayer? and assign it to thee videotexture?
so instead of:

var _player:IVideoPlayer;

and

_player videoTexture.player

this:

var _player:IVideoPlayer = new IVideoPlayer(whateverneedstobehere);

and

videoTexture.player _player

just a guess, don’t know for sure and haven’t checked it.

-Q

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X