All pastes #552929 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-09 14:42 UTC
rendered paste body
import flash.external.*;
ExternalInterface.addCallback("switchTrack", this, switchTrack);
var sound:Sound = new Sound(this);
function switchTrack(mp3) {
	position._width = background._width;
	sound.loadSound(mp3, true);
}
onEnterFrame = function () {
	duration = sound.getBytesTotal()/40;
	position._width = sound.position/duration*background._width;
	grip._x = position._x+position._width;
};