Hello
I created an mp3 player but i have problems in getting info from XML file (song duration)
function timebar()
{
if (percentage = 100)
{
timeBar._xscale = 0;
timeBar.onEnterFrame = function()
{
totaltime = this._parent.sndTrack.duration;
ongoingtime = this._parent.sndTrack.position;
percentage = Math.round(ongoingtime / totaltime* 100);
timeBar._xscale = percentage;
}
}
}
I’m new to the action script and problems about creating functions
after preload() function i call for firstsong()
.
I have firstsong(), prevsong() and nexsong() functions and timebar() function that is called in each firstsong(), prevsong() and nexsong() functions.
In problems about streaming audio this can’t work for me and i come up with an idea that to add each songs time as seconds on XML.
The question is how can take the info from XML and divide it with ongointime.
Thank you