ActionScript 3.0 :: Getting Minutes/Seconds Of Streaming Mp3 File
Sep 14, 2009
I have been searching and trying different methods to locate how to calculate minutes and seconds of an audio file that has been loaded within my public class. Does anyone know how to get seconds/minutes with a loaded sound object? I can easily do it with video, but it seems a bit harder to find info on calculating sound object length in minutes and seconds.
Currently, my class:Loads the mp3 file Contains pause/play, mute/unmute buttons and they function beautifully A scrub bar - this is the piece I am currently working on. I want to add a current time and total time (minutes/seconds)Scrub bar contains progress area bar - already built and functioning
I'm working with the youtube API and I'm getting the current time on the video as seconds.What I want to do is to convert them into this: MM:SS.I've tried to google and try different things by myself but nothing seemed to work and be efficient.
I am currently using the following code to display the secconds of a FLV being played: ActionScript Code:time_txt.text = Math.round(_root.video_mc.videoZ.playheadTime*100)/100;I need to change this to display MM:SS (minutes:seconds) rather than just seconds and decimals.The javascript people here at work suggested something like this:
ActionScript Code: function strPad(str, places, pad, side) { while (length(str) < places) {
Any tutorials or source files for the timer. Just a simple timer that counts down by minutes and seconds for 10 minutes. The closest I got are a bunch of codes that I'm not really good at translating. Just a simple timer that will trigger the end quiz page when time is up.
I'm creating an online power hour application. And i need to have a timer to alert the user every sixty seconds for 60 minutes.. Should be simple enough. I'm just having some difficulty.
I am looking for a countdown timer what will countdown mins + seconds. All Ican find is a countdown to an event christmas day etc, but this wont work for what I need. I need a timer countdown that wont start again everytime a user enters the game I need a timer so all users enter the game at exactly the same time to the second, I've tried to do it using as3 php mysql but there is to much time difference between users how will I do this.
I need to do a countdown time coder showing minutes, seconds and frames (25fps). I've searched a lot but w/out a fish The only similar thing I found is the Kirupa's tut, but I think it's too much graphical (I'd like it only w/ fonts) and actually I'm not so AS skilled Does anybody know where can I start or a good tut?
I'm trying to add a running timer to my flash movie. I've got it now so that it counts seconds (by comparing _currentframe with the frame rate), but I'd like to be able to express that in minutes:seconds.
I'm trying to add a running timer to my flash movie. I've got it now so that it counts seconds (by comparing _currentframe with the frame rate), but I'd like to be able to express that in minutes:seconds.
I have a problem on streaming my files with the FMS 4. There are several testfiles on my VOD-directory, most of them with a length about 2 minutes. Altough there are some with 12 minutes. So if i want to play all those files with the StrobeMediaPlayer, only the files with a 12 minutes length are working, on the others the player ist sayin "We are unable to connect to the content you´ve requested. We apologize for the inconveniece.".ind any option or notice where it says there is a minimum lenght to stream... so whats going wrong here?Additional Infos:FLV, MP4H.264 + AAC
I am trying to create something in which even when the flash file is already loaded and never closed, it will update itself. All the variables that are changing are pulled from a text file and loaded using
myData = new LoadVars(); myData.onLoad = function(){
and then I set all of the variables of the text equal to dynamic text fields. My question is: Is it possible to have it reload this text file (reset the text fields to the new variable) every so often?
I'm trying to read bmp fille byte by byte and then redraw it. For that I made a .fla file for veiwing and .as file for coding. I just started coding and made import to the follwing files in this scenario and I get errors while debugging.
1172: Definition flash.filesystem:File could not be found.1172: Definition flash.filesystem:FileMode could not be found.1172: Definition flash.filesystem:FileStream could not be found.5000: The class 'FileStreamLive' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
I've seen many samples on filestreaming but all were using the mxml scripting that I don't know
I am trying to make a real time communication for a flash file with php so if there is a change on the php the data are refreshed on the flash automatically.
I have a function that loads the php data in flash, how can I repeat that so it checks if the data have changed every, 5 seconds or so?
Also, how can I create a function that will do something when the data changes? So let's say the data is 20, if the file communicates with php and sees that data have changed to 25, how can I tell flash to play a movieclip or whatever?
I have a movie that I need to update every 60 seconds, calling a PHP file, which provides update server time/date, and (on-the-fly updated) air times for an online video. Is every 60 seconds too CPU intensive?
I have been trying to figure out how to play the last x seconds of a mp3 file depending on a variable. I could not find any examples/tutorials that are close to what I need.
The thing is, I have an animation that lasts 9 seconds (this is a variable), I want the sound file to last 9 seconds as well.
I can get which part of file in bytes is loaded using netstream.bytesLoaded,netstream.bytesTotal, I can get the current playing position using netstream.time. But I want to know how many seconds of video are already loaded (not the length of buffer, which remains constant).
When i use time varaible and then minus the time. Ive noticed that flash does not count down in seconds, but the speed of light. My maths are not very strong so how can i get flash to count in seconds
var time =60; sprite.onEnterframe = function(){ time -=1; ( this counts faster than seconds) }
I'm trying to figure out how I can make the sound file that I load into Flash start at x seconds and end at x+30 seconds.So basically, I just want a 30 second sample to play starting at a specific time position. Does anyone have any advice on how to do this or have links to somewhere I can read up on it?
I am using Adobe Flash Media Streaming Server 3.5 but I can't find any output file (fx a xml file) that I can pull out info from and use on my website via a PHP or ASP script. It could be nice - in the website - to retrieve info like "online users attending", "running / streaming state" (online or offline) and other relevant info about the streaming, so I on the website can display how many that are online when a webtv event is streaming.
Is it possible to play the video (mp4) in real time using some flash player? What I mean by in real-time is that player would receive data on the fly, not from alredy saved file but e.g. php script (which sends appropriate content-type header) THAT IS DOWNLOADING AND 'ECHO-ing' THE FILE AT THE TIME PLAYER PLAYS IT - like e.g. some kind of live stream.
I'm using the "load streaming mp3 file" behavior, as seen below. Code: on (release) { //Load Streaming mp3 behavior if(_global.Behaviors == null)_global.Behaviors = {}; if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {}; if(typeof this.createEmptyMovieClip == 'undefined'){
I need to add a loader of some form to it tho. My plan is to have an MC with 2 frames. One with the word "Loading" in it and the other blank. The idea being, if the track is still loading it goes to the loading frame, otherwise to the blank frame. I've already added Code: _parent.mp3Loader.gotoAndStop("on"); To the above, to make the loader active.
I was thinking of having something like the following, to turn the loader off. Code: if(tune1.loaded) { _root.mp3Loader.gotoAndStop("off"); trace("song loaded"); } but that doesn't work...
I want to record the my stream at media server with file name 1.flv, and after 30 min same stream saved in another file like 2.flv, same prcess atfetr each 30 min.