mark110384 Posted September 10, 2009 Share Posted September 10, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/173759-please-help-flv-auto-rewind-issue/ Share on other sites More sharing options...
matthewjumpsoffbuildings Posted November 1, 2009 Share Posted November 1, 2009 did u put 'import fl.video.VideoEvent' before you defined playAgain? cause that should work... Quote Link to comment https://forums.phpfreaks.com/topic/173759-please-help-flv-auto-rewind-issue/#findComment-948683 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.