Hi, I am trying to get mp3 sound position and sound length to work. Heres the code below and I ahve attached the FLA.
// Create a new Sound object.
var music = new Sound();
// Create a text field to show sound length.
this.createTextField("dur", 1, 100, 100, 200, 30);
dur.border = true;
dur.setNewTextFormat(new TextFormat("Verdena", 20));
// Show sound length.
dur.text = s.duration;
// Create a text field to show sound position.
this.createTextField("pos", 2, 100, 150, 200, 30);
pos.border = true;
pos.setNewTextFormat(dur.getNewTextFormat());
// handy, eh?
// Every frame, display how much of the sound has played.
this.onEnterFrame = function() {
pos.text = s.position;
};
I have attached my FLA file. You will need to through a MP3 in the same dir as swf file names test.mp3…