Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-05-2010, 04:34 PM   #1
sinewave
Member
 
Join Date: Feb 2006
Posts: 57
Default [AS3] Playback component :: totalTime traces out to "NaN"?

Hi there,

You can skip the explanation if you want and look right at the code. Why is totalTime tracing out to NaN?

I have a custom UI for the playback component in a site I'm working on.
Users build a playlist of videos, press a "play" button, which initiates some animation leading up to the user seeing a video player component.
The UI works just fine, except for the FIRST video (and only sometimes, not everytime). When the FIRST video is playing, the scrubber and progress indicator do not do anything. You can't even click on them. After that, it works fine. Investigation revealed that the component's totalTime is tracing out to "NaN" when the scrubber stops working.

This is my progress and scrubber code:

ActionScript Code:
addEventListener(Event.ENTER_FRAME, v_status); function v_status(e:Event):void {     // progress bar      var percPlayed:Number=mediaTable.vidPlayer.playheadTime/mediaTable.vidPlayer.totalTime;     if (mediaTable.vidPlayer.playing) {         debugTxt.appendText(String(percPlayed));         vidControls.progressBar.scaleX=percPlayed;         vidControls.scrubber.x=(vidControls.progressBar.width) - 22;     }     // buffer bar     var percLoaded:Number=mediaTable.vidPlayer.bytesLoaded/mediaTable.vidPlayer.bytesTotal;     vidControls.bufferBar.scaleX=percLoaded; }
sinewave is offline   Reply With Quote
Old 07-05-2010, 05:05 PM   #2
sinewave
Member
 
Join Date: Feb 2006
Posts: 57
Default

I found a quasi-solution to this problem, it appears that my setting the buffertime to anything but the default (0.1) causes the player to skip the metadata: http://board.flashkit.com/board/showthread.php?t=777813
sinewave is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:52 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.