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
https://forums.phpfreaks.com/topic/173759-please-help-flv-auto-rewind-issue/
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.