Jump to content


  • Posts

  • Joined

  • Last visited


0 Newbie
  1. Hi, Just to confirm that things are working for both flashplayer 9 and flashplayer 10 now. Thanks again!
  2. Hi Thank you again for the response!! The VideoPlayer code could quite well contain some non optimized code and or flow issues. The class will still be debugged and optimized. As we're compiling to flashplayer 9 then we hadn't started that process before making certain the seeking would work. Also a VERY good point regarding key frames though. I just grabbed a miscellaneous flv from the server to test with. The comment about 'it used to work' is because I was using a different flv before, with for certain different keyframes, etc. So that explains that issue. I will also test the PLAY_PROGRESS issue in flashplayer 9 and post back what my results were. I'm sure it works though!
  3. Oops, sorry about disclosing the svn secret Unfortunately though, it still does not work. I was compiling it in FDT and tried both Flex / AS3 and Flashplayer 9 / 10. I then created a new IDE project to test as well, and with both flash 9 / 10 it now does not work What seems to be happening is the following: Flashplayer 9 -> When gotoVideoTime(pTime, true), line 111 in the VideoPlayer class, is called the video simply continues to play. The playProgress event also dissapears and reference seems be be lost to the video object. Flashplayer 10 -> [ this used to work in the prior version though ] When gotoVideoTime(pTime, true), line 111 in the VideoPlayer class, is called the video seeks to the correct time but does not play. The playProgress event does not dissapear though. Basically the video should play until 2.5 seconds and then seek to 1.5 seconds and then start looping between these 2 timescodes. I've attached the zip of the test which now also includes a test video file. Please let me know if you need any more info on this. Thanks!
  4. Thanks! Glad to hear that the tests were helpful as well. Did the question regarding svn and latest versions also make sense? Thanks again!!
  5. Hello, Thanks very much for the reply. I've taken a look and have made a few isolated tests and found some new information. First off though, the version. When I said 186 [ now 188 ], I was talking about the svn revision number. I access the libraries as svn externals and am accessing trunk [ which should be the latest version correct? ] Should I be accessing the latest version from a different svn url? Further this revision number has the following code in LoaderMax regarding the version public class LoaderMax extends LoaderCore { /** @private **/ public static const version:Number = 1.731; Secondly, the tests. I've attached a zip file with a variety of tests defined below [ I couldn't include the flv as it was too large. The name of the flv that I used in the tests was 'game01.flv' and located in the same directory as the swf ]. What I noticed in the end is that when I compile for flash player 9 it does not work, but when compiling for flash player 10 it does. I've tested both using code in the timeline [ test2 ] as well as using a document class [ test 3 ]. I normally compile directly from FDT. Test1: Tests autoplay with code directly in a fla. Result: works just fine. my original version was compiled from FDT, not sure if this makes a difference and I can include the original swf when I'm back in the office if it's helpful Test2 Tests the class that uses a VideoLoader instance and implements a looping control for the video Result: works fine when exported for flashplayer 10, but doesn't work correclty when exported for flashplayer 9. The loop doesn't happen and the listeners dissapear. Test3 Test is the same as Test2 but uses a document class Result: same as test 2 Thanks again for taking a look at this!! Could you let me know if you think it's correctable for flashplayer 9 and also let me know the proper way to obtain the latest versions from svn?
  6. Hi. Thanks again for all of the fantastic commitment to the community. It's appreciated by many I'm currently having some odd issues with the VideoLoader class. I'm actually having two issues, the second came from the first but seems simpler. I'll detail that one first. 1) AutoPlay issue -- var videoContainer : Sprite = addChild(new Sprite()) as Sprite; var videoLoader : VideoLoader = new VideoLoader("http://www.domain.com/path/to/video.flv", {name:"myVideo", container:videoContainer, scaleMode:"none", autoPlay:false}); videoLoader.load(); This code 'works' but sometimes the video will autoPlay and sometimes it won't. If I refresh the browser multiple times I'll get it playing 1 times out of 4. 2) gotoVideoTime issue -- package greensock.loadingTest { import com.greensock.events.LoaderEvent; import com.greensock.loading.VideoLoader; import mx.formatters.NumberFormatter; import flash.display.Sprite; import flash.events.MouseEvent; import flash.geom.Point; import flash.text.TextField; import flash.text.TextFieldAutoSize; public class VideoPlayer extends Sprite { private var _loopPoint : Point = new Point(0, 0); private var _shouldLoop : Boolean; private var _prevInLoop : Boolean; private var _videoLoader : VideoLoader; private var _videoContainer : Sprite; // private var _tfState : TextField; private var _tfLoopPoint : TextField; private var _tfTitle : TextField; static private var FORMATTER : NumberFormatter = new NumberFormatter(); FORMATTER.precision = 2; // public function VideoPlayer(pUrl : String) { // _videoContainer = addChild(new Sprite()) as Sprite; _videoLoader = new VideoLoader("http://ph-c.codedazur.lan/assets/flv/scene03.flv", {name:"myVideo", container:_videoContainer, scaleMode:"none", bgColor:0x666666, autoPlay:true, volume:1}); _videoLoader.addEventListener(VideoLoader.PLAY_PROGRESS, handlePlayProgress); _videoLoader.addEventListener(VideoLoader.VIDEO_COMPLETE, handleVideoComplete); // _tfState = this.addChild(new TextField()) as TextField; _tfState.autoSize = TextFieldAutoSize.LEFT; _tfState.width = 100; _tfLoopPoint = this.addChild(new TextField()) as TextField; _tfLoopPoint.autoSize = TextFieldAutoSize.LEFT; _tfLoopPoint.width = 100; _tfTitle = this.addChild(new TextField()) as TextField; _tfTitle.autoSize = TextFieldAutoSize.LEFT; _tfLoopPoint.x = 150; _tfTitle.y = 25; _tfTitle.text = pUrl; loopPoint = new Point(1, 10); // addEventListener(MouseEvent.CLICK, handleMouseEventClick); // _videoLoader.load(); } private function handleMouseEventClick(event : MouseEvent) : void { shouldLoop = !shouldLoop; if (_videoLoader.videoTime == _videoLoader.duration) { _videoLoader.gotoVideoTime(0, true); } } // public function play() : void { // _videoLoader.playVideo(); // } // // public function stop() : void { // _videoLoader.pauseVideo(); // } public function get loopPoint() : Point { return _loopPoint; } public function set loopPoint(pValue : Point) : void { _loopPoint = pValue; _tfLoopPoint.text = _loopPoint.toString(); } public function get shouldLoop() : Boolean { return _shouldLoop; } public function set shouldLoop(pValue : Boolean) : void { _shouldLoop = pValue; } private function handlePlayProgress(event : LoaderEvent) : void { if (_shouldLoop && _prevInLoop && afterLoop) { restartLoop(); } _prevInLoop = inLoop; // _tfState.text = _shouldLoop ? "looping=true" : "looping=false"; _tfState.appendText(" [" + FORMATTER.format(_videoLoader.videoTime) + "]"); } private function handleVideoComplete(event : LoaderEvent) : void { if (_shouldLoop && inLoop) { restartLoop(); } } private function get inLoop() : Boolean { return (!beforeLoop && !afterLoop); } private function get beforeLoop() : Boolean { return (_videoLoader.videoTime < _loopPoint.x); } private function get afterLoop() : Boolean { return (_videoLoader.videoTime > _loopPoint.y); } private function restartLoop() : void { _videoLoader.gotoVideoTime(_loopPoint.x, true); } } } The point of this class is to have it seek to 1 second when it reaches 10 seconds [ you turn this feature on by clicking the video ]. The problem is that when it hits 10 seconds it seems to seek to 1 second as the progress indicator shows 1 as the videoTime, but then the event listener is no longer called after this. [ It may seem odd to use the point, but it was just a quick way of holding two numeric values ]. There are certainly a few things here and there that need refining, but the issue is that when I call gotoVideoTime, it seems to as the progressHandler says the video is at the correct point, but then the eventHandler is no longer called and the video simply keeps playing! I've also tried to just call _videoLoader.pauseVideo() in the restartLoop() function but this also doesn't work... however, it does seem to mute the video?? Any ideas would be much appreciated. PS - I've made sure I'm at the latest revision [ 186 ]