Jump to content

Please Help: FLV auto rewind issue


mark110384

Recommended Posts

Hey guys, I am currently experiencing an issue with FLV auto rewind. The issue is that I get the following compiler error.

 

1046: Type was not found or was not a compile-time constant: VideoEvent.

 

The coding is as follows

 

var tut_video:Video = new Video();

addChild(tut_video);

 

function ns_onMetaData(item:Object):void {

 

// Resize video instance.

tut_video.width = 257.4;

tut_video.height = 171.7;

// Position video instance on stage

tut_video.x = 274.9;

tut_video.y = 105.5;

 

}

 

 

var movie_url = "../movies/Courage.flv";

 

var nc:NetConnection = new NetConnection();

nc.connect(null);

 

var ns:NetStream = new NetStream(nc);

ns.client = {

onMetaData:ns_onMetaData

};

 

 

tut_video.attachNetStream(ns);

 

ns.play(movie_url);

 

/* If un-quoted the flv will not run!

function playAgain(eventObject:VideoEvent):void {

 

 

ns.autoRewind = true;

ns.autoPlay();

}

 

ns.addEventListener(VideoEvent.COMPLETE, playAgain);

*/

 

 

I also tried adding import fl.video.VideoEvent; but to no avail it failed to work.

 

Any suggestions would appreciated. Thanks in advance

Link to comment
Share on other sites

  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.