Adobe Dreamweaver Forums



Last 10 THreads :         CS4 Motion Editor issues (Last Post : aaronlyon - Replies : 4 - Views : 9 )           »          Bridge No Longer Rotates Automatically (Last Post : Michael_Palumbo@adobeforums.com - Replies : 1 - Views : 2 )           »          dollarFormat / numberformat problem (Last Post : izdabye - Replies : 0 - Views : 1 )           »          Call out side flex (Last Post : Amy Blankenship - Replies : 15 - Views : 16 )           »          captions for photos (Last Post : dc111652 - Replies : 0 - Views : 1 )           »          Re: CS4 GPU Acceleration and Intel X3100 (Last Post : Paul_B_Brown@adobeforums.com - Replies : 0 - Views : 1 )           »          error 1034 (Last Post : shottogan - Replies : 0 - Views : 1 )           »          Keyboard events don't work in player or projector (Last Post : tunghoy - Replies : 0 - Views : 1 )           »          Help with caption box question (Last Post : NZ-developer - Replies : 1 - Views : 2 )           »          Realistic Cat Hair and... (Last Post : chrisf111 - Replies : 0 - Views : 1 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flash > Flashcom
 
Tags:



Reply
  #1 (permalink)  
Old 11-20-2008, 01:44 AM
fmeenz
 
Posts: n/a
Diggs:
Default NetStream.time Inconsistent

Hello,

I am using the following code provided by Adobe to display the current time of
a media stream

var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("video1.flv");
//
stream_ns.onStatus = function(infoObject:Object) {
statusCode_txt.text = infoObject.code;
};

this.createTextField("time_txt", this.getNextHighestDepth(), 10, 10, 100, 22);
time_txt.text = "LOADING";

var time_interval:Number = setInterval(checkTime, 500, stream_ns);
function checkTime(my_ns:NetStream) {
var ns_seconds:Number = my_ns.time;
var minutes:Number = Math.floor(ns_seconds/60);
var seconds = Math.floor(ns_seconds%60);
if (seconds<10) {
seconds = "0"+seconds;
}
time_txt.text = minutes+":"+seconds;
}


and it works great for the most part. However, sometimes when moving to a new
stream in the application, the stream seems to get caught up. Ive traced the
"time_txt" variable (minutes + seconds) receiving the following output below.
And in the display in the application, it "blinks" matching output, in the
interval that is set in the the number in the setInterval variable above (500).

it doesnt happen all the time. when i let the media play and advance itself,
it seems to work ok. its when i "agitate" the streams -- moving between media
streams quickly, advancing, going back, etc. when its working normally and i
trace the text_txt variable, there are no zero stops inbetween the seconds in
the output below.

If anyone has any suggestions i would appreciate it.

thanks!


0:0
0:0
0:0
0:0
0:1
0:0
0:0
0:0
0:1
0:0
0:0
0:0
0:2
0:0
0:0
0:0
0:3
0:0
0:0
0:0
0:3
0:0
0:0
0:0
0:4
0:0
0:0
0:0
0:4
0:0
0:0
0:0
0:5
0:0
0:0
0:0
0:5
0:0
0:0
0:0
0:6
0:0
0:0
0:0
0:6
0:0
0:0
0:0
0:7



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-20-2008, 01:54 PM
Semon Seos
 
Posts: n/a
Diggs:
Default Re: NetStream.time Inconsistent

http://seoservise.ru
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 03:29 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk