All pastes #552200 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-09 04:40 UTC
rendered paste body
import flash.external.*;
ExternalInterface.addCallback("switchTrack", this, switchTrack);
var sound:Sound = new Sound(this);
function switchTrack(mp3) {
	sound.loadSound(mp3, true);
	position._width = 0;
	position._x = 0;
	grip._x = position._x+position._width;
	if (sound.getBytesLoaded() > 10000)
	{}
}
onEnterFrame = function () {
	position._width = sound.position/sound.duration*background._width;
	grip._x = position._x+position._width;
};
switchTrack("http://robbiemcgonigle.com/music/rusty/No%20More.mp3");