I have my audio loaded from an external swf. The audio itself is on the timeline and it's set to stream. Now how would I get it to display the time that has elapsed in minutes and seconds. I think getTimer might work but it only brings back the frames I believe. How would I correct this problem? Do the fps matter?
what the getTimer function does is return the number of miliseconds that have passed since the movie started playing. So you could set up some code like this...
time = getTimer();
...the number of miliseconds that have passed since the start of the movie would be stored in the 'time' variable.
What i think may work in your situation is when you start playing your audio piece, store the time that has passed in a variable (let's call it "startTime"), then while the audio plays, again get the time that has elapsed, but subtract "startTime" from that time, and that will give you the number of miliseconds since your audio started playing. And you can naturally work out the seconds and minutes from that.
alright so now I got the jist of how it works, and I think I get your idea. will onClipEvent(enterFrame) work in this situation. cause the timer won't start until I press play, and if I pause it and play it again will the timer pick up where I left off? or if I fast forward and rewind will it still work. Cause I know getTimer returns the time a movie has been loaded in milliseconds, is there anything else that would actually return the frame number that the movie is on? That way divide by the number of fps to get the seconds that have been played. Would that work with a streamed audio file on the timeline?
Check out my site and you'll see what I mean or check out the attachement. Maybe you can fix it up a little. (wink wink)