Error loading video texture

Software: Away3D 4.x

fgauer, Newbie
Posted: 13 June 2013 05:47 PM   Total Posts: 6

Hi Guys,

I’m getting the following error on the second line of code:

var _player:SimpleVideoPlayer = new SimpleVideoPlayer();
var vt:VideoTexture = new VideoTexture(“d://V1.flv”, 512, 512, false, false, _player);

the error is:
TypeError: Error #1034: Type Coercion failed: cannot convert to away3d.materials.utils.IVideoPlayer.

1) The video is in the right location.
2) I can play the video using another .flv player.
3) I’ve tried an mp4 video here and I get the same error

Thanks in advance!

   

fgauer, Newbie
Posted: 13 June 2013 07:40 PM   Total Posts: 6   [ # 1 ]

Even when I change the line to:
var vt:VideoTexture = new VideoTexture(“d://V1.flv”, 512, 512, false, false);

...letting VideoTexture create and use its own internal player (it creates a SimpleVideoPlayer() for you if you don’t specify) I still get the same error. It’s basically trying to say SimpleVideoPlayer() is not of type IVideoPlayer - when it clearly is.

I also looked through the GIT code, and it just all looks right. I don’t understand why it is giving me this error. It just shouldn’t be…

   

fgauer, Newbie
Posted: 13 June 2013 07:47 PM   Total Posts: 6   [ # 2 ]

Here is a way to duplicate the error. I am using away3d-core-fp11_4_1_1_Beta.swc. I am using FlashDevelop IDE.

Create a new project and just do this:

public function Main():void
{
var _player:SimpleVideoPlayer = new SimpleVideoPlayer();
var vt:VideoTexture = new VideoTexture(“some video file”, 512, 512, false, false, _player);
}

   

fgauer, Newbie
Posted: 13 June 2013 09:44 PM   Total Posts: 6   [ # 3 ]

Okay…it’s a problem with the away3d-core-fp11_4_1_1_Beta.swc

I cloned your GIT repository and just ran straight with the source code. No errors and I see video cool smile

...just a heads up you might want to rebuild that .swc or look into why that .swc build is throwing the error…

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X