Hello there!
I raise this thread as I'm very interested in having that king of data from a sound (html5 only).
Maybe someone has a pretty solution (or Klaus has?)...
For those interested with a workaround, I would set a kind of "data" tag with file name and manually entering the time I KNOW it is. Then , by using the frame rate/timeelapsed, you are able to know the percent of the file played.
The Very Ugly Way:
(I'm sure a better person that I will produce a more efficient code)
|
Quellcode
|
1
2
3
4
5
6
7
8
|
<data name="soundstuff" fileurl="my.mp3" length="180" elapsed="0" />
<action name="onstartsound">
tween(data["soundstuff"].elapsed, 1, get(data["soundstuff"].elapsed), default, trace("finished :)"));
</action>
<action name="onrefresh">
trace("We are at ", get(data["soundstuff"].elapsed), "/", get(data["soundstuff"].length), " of the file...");
</action>
|
I know. It's awful, but it's the way I found ;)