| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
One of many
Join Date: Sep 2002
Location: phoenix
Posts: 268
|
hello all,
i'm trying to get the lenght of a stream(flv) and display it. get the amount of time that has played on the stream and display that, it will look like this in the end : 01:32/09:45 has any one done this and what would be the best way to go about it? i already have a .asc file that grabs the stream.length and brings it back into flash in secs, but that's as far as i've gotton, and i want to go about this the right way. am i going to create a getTimer() object or is there a clientside script that will accurately display the stream. thanks, also, how would i go about trimming the extra characters off of the seconds? |
|
|
|
|
|
#2 |
|
One of many
Join Date: Sep 2002
Location: phoenix
Posts: 268
|
ok, i've gotten the total time, but for some reason, NetStream.time() does not work
it just returns "undefined"? talk'n to myseeaeaalffffff.... |
|
|
|
|
|
|
|
|
#3 |
|
One of many
Join Date: Sep 2002
Location: phoenix
Posts: 268
|
bad syntax was the villan.
|
|
|
|
|
|
#4 |
|
Registered User
Join Date: Aug 2003
Posts: 62
|
hi guys,
What is the simplest way to display the time according to my flashcom server. Do I have to add something to my main.asc file? On the client side, does my movie need a dynamic text box that references a variable etc? I just need to display the current server time, plain and simple. Thank-you very much, artane |
|
|
|
|
|
#5 |
|
One of many
Join Date: Sep 2002
Location: phoenix
Posts: 268
|
put this in your main.asc file.
PHP Code:
put this in the fla that plays yo video: PHP Code:
yup, hope that helps |
|
|
|
|
|
#6 |
|
Member
Join Date: Feb 2004
Location: Texas
Posts: 85
|
exactpixel,
could you please explain your code above. I am struggling severly with talking back and forth between the server side code and client side and I am trying to accomplish something similar to your first post on this thread concerning elapsed time and total time. I try to just put an application.acceptConnection = function() method in my .asc file and I continue to get errors saying there is a syntax error...missing ; before statement. Well why should there be a semi colon before that method declaration. Makes no sense. Anyway, any help would be appreciated. |
|
|
|
|
|
#7 |
|
Registered User
Join Date: Nov 2004
Posts: 1
|
To get back on the original topic issue... I am interested in getting the length of a recorded (in my case audio but assume it works the same for video) flash stream file.
The FCS documentation comes with the following example (slightly altered though): For the .fla file, this code (php formatting seems to work nicely) PHP Code:
PHP Code:
either ways... it would have been nice if they put a fully working example for this code in the documentation, as this partial example got me stuck, eventhough it does work... if you want to trace that is. The getInfo() function calls the prototype function sendInfo on the server, and the result is stored in a (new) object. This new object however, also has to wait for the FCS to respond to the call, so it uses '.onresult' and then sets _root.streamlength So I ended up with jumping in timelines after all.. My Frame 1 has the code: PHP Code:
PHP Code:
hope this helps someone.. got me stuck for a few hours on how to handle the value return by the nc.call.. jumping seems to work. Last edited by Par; 11-09-2004 at 10:50 PM.. Reason: Corrected typo's |
|
|
|
|
|
#8 |
|
One of many
Join Date: Sep 2002
Location: phoenix
Posts: 268
|
Sorry, just got the email notification. Did that help you at all?
ep |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Sep 2007
Posts: 9
|
myNetStream.onMetaData = function(infoObject:Object) {
var duration = infoObject.duration; } |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|