Hi,
Without seeing your set up and stuff is this any help to you
PHP Code:
onClipEvent (load) {
BarWidth = 200;
//BarWidth = MyBar._width;// sets it to whatever width the bar is
}
onClipEvent (enterFrame) {
loadbar = Math.floor(_root.mysound.getBytesLoaded / BarWidth);
var position = Math.floor(_root.mysound.position / 1000);
var duration = Math.floor(_root.mysound.duration / 1000);
var pos = Math.floor((BarWidth * _root.mysound.position) / _root.mysound.duration);
scroller._x = pos;
cue = Math.floor((scroller._x * duration) / BarWidth);
//cue = Math.floor(((scroller._x * duration) / BarWidth) / 1000);// probably better !!
scroller.onPress = function()
{
startDrag(scroller, true, 0, 0, BarWidth, 0);
_root.mysound.stop();
};
scroller.onRelease = scroller.onReleaseOutside = function ()
{
stopDrag();
_root.mysound.start(cue,true);
};
}