Jump to content
Search Community

cristina

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by cristina

  1. It was a mistake on my part to assume we were streaming, I assumed that buffering was somewhat related to streaming, but now I recall that in college we setup a streaming server and It was a specific technology altogether. Thank you very much for this enlightening answer
  2. Hello and thank you so much for the most useful AS3 Library I've ever used! I'm currently using a VideoLoader to playback external MP4 on a client website. I've set bufferMode=true and all goes well on short videos. However, on larger videos (about 100MB) when I try to seek the video immediately after the first bufferFull event: - bufferEmpty is displached properly - I display a 0% buffer progress info and wait for buffer progress - It stays at 0% for about 20 seconds! -> My problem - It then starts to show progress and quickly gets to 100% - bufferFull is dispached, all is good. I can't quite explain to my client why does this happen on our website and it doesn't happen on youtube. On youtube it starts re-buffering immediately after seeking to a further frame I'll post the essential parts of my code and I hope you can give me some insight on this subject, thank you very much in advance. Here is how initialize the loader: // Estimated Bytes are provided on each video video = new VideoLoader(url, {container:this, x:bkg.x, y:bkg.y, width:bkg.width, height:bkg.height, scaleMode:"proportionalInside", bgColor:0x000000, autoPlay:false, volume:1, auditSize:false, estimatedBytes:this.estimatedBytes, bufferMode:true, onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); video.load(); video.gotoVideoTime(0); video.addEventListener(VideoLoader.PLAY_PROGRESS, updatePlayProgress); video.addEventListener(VideoLoader.VIDEO_COMPLETE, videoComplete); video.addEventListener(VideoLoader.VIDEO_BUFFER_EMPTY, bufferEmptyHandler); video.addEventListener(VideoLoader.VIDEO_BUFFER_FULL, bufferFullHandler); video.content.addEventListener(MouseEvent.DOUBLE_CLICK, toogleFullScreenMode); Here are the listener functions: public function progressHandler(event:LoaderEvent):void { trace("progressHandler",(Math.round(event.target.progress*100))+"%"); // custom code to display progress text } public function completeHandler(event:LoaderEvent):void { // custom code to hide buffer progress text } public function errorHandler(event:LoaderEvent):void { trace("error occured with " + event.target + ": " + event.text); } public function bufferEmptyHandler(evt:LoaderEvent):void { // custom code to show buffer progress text, starting with "0%" addEventListener(Event.ENTER_FRAME, reportBufferProgress); } public function bufferFullHandler(evt:LoaderEvent):void { trace("bufferFullHandler"); removeEventListener(Event.ENTER_FRAME, reportBufferProgress); completeHandler(null); } public function reportBufferProgress(evt:Event):void { // ISSUE: it stays at 0% for about 20 seconds on large movies and then evolves super fast to 100% trace("buffer progress:",video.bufferProgress); } public function updatePlayProgress(evt:LoaderEvent=null) { // custom code to show play progress bar } public function videoComplete(evt:LoaderEvent=null) { // custom code for when the video is done playing }
  3. Hello, I'm currently working on an application with various menus which have an opening animation. I've created a timeline for each menu. To open the menu, I play() the timeline. To close the menu, I reverse() it. This worked on multiple cases, but I've been stuck with a menu which plays much slowly on reverse, even though I have stated "useFrames:true" and "ease:Linear.easeNone". I'll paste the code bellow: var endframe : int = mc.totalFrames-1; var duration : int = mc.totalFrames-1; var tween : TweenMax = new TweenMax(mc, duration, {useFrames:true, frame:endframe, ease:Linear.easeNone}); var timeline : TimelineMax = new TimelineMax({paused:true, useFrames:true}); timeline.insert(tween); function OpenMenu(evt:MouseEvent) { timeline.play(); } function CloseMenu(evt:MouseEvent) { timeline.reverse(); } RESULT: the menu closes in slow motion, as if something was wrong, delaying the whole process. However, I've accomplished this successfully before. What am I missing here..? Thank you in advance..!
  4. Hello, I'm currently working on an application with various menus which have an opening animation. I've created a timeline for each menu. To open the menu, I play() the timeline. To close the menu, I reverse() it. This worked on multiple cases, but I've been stuck with a menu which plays much slowly on reverse, even though I have stated "useFrames:true" and "ease:Linear.easeNone". I'll paste the code bellow: var endframe : int = base.totalFrames-1; var duration : int = base.totalFrames-1; var tween : TweenMax = new TweenMax(mc, duration, {useFrames:true, frame:endframe, ease:Linear.easeNone}); var timeline : TimelineMax = new TimelineMax({paused:true, useFrames:true}); timeline.insert(tween); function OpenMenu(evt:MouseEvent) { timeline.play(); } function CloseMenu(evt:MouseEvent) { timeline.reverse(); } RESULT: the menu closes in slow motion, as if something was wrong, delaying the whole process. However, I've accomplished this successfully before. What am I missing here..? Thank you in advance..!
×
×
  • Create New...