Make sound start secs later from its actual begining?

Hey there!

I have the script below from a tutorial, and I want to make my track start 30 seconds from its actual beginning, in order to make it fit my swf better. I know it’s gotta be a silly detail but I’m new to Actionscript and after all that coding, I’m kinda bummed. :panda: So please, HELP! Thank you already! :slight_smile:

################### SCRIPT #############################
[SIZE=2]stop();
//
import mx.transitions.;
import mx.transitions.easing.
;
//
// Initial Variables
//
var mySound:Sound = new Sound(this);
var volControl:Object = new Object({vol:100});
var curPos:Number = 30;
//
// Main Function
//
function fadeVolume(target:String):Void {
switch (target) {
case “UP” :
var targetVol:Number = 100;
break;
case “DOWN” :
var targetVol:Number = 0;
break;
default :
return;
}
//
// initiate a few variables:
// one to set an interval and set our sound’s volume,
// the number of seconds the fade should last,
// and finally the tweening function to use.
var timer:Number = setInterval(changeVolume, 100);
var duration:Number = 3;
var easeType:Function = Regular.easeOut;
//
// this quick and dirty function will actually set the volume for us
// since we can’t access the volume without the setter method.
function changeVolume():Void {
mySound.setVolume(volControl.vol);
}
var myListener:Object = new Object();
myListener.onMotionFinished = function() {
// when the tween is done,
// if we just turned the volume down, stop the sound,
// and store its current position.
if (target == “DOWN”) {
mySound.stop();
curPos = mySound.position/1000;
}
// in any case,
// set the sound’s volume to the target level
// and clear the interval.
mySound.setVolume(targetVol);
clearInterval(timer);
};
var volTween:Tween = new Tween(volControl, “vol”, easeType, volControl.vol, targetVol, duration, true);
volTween.addListener(myListener);
}
//
// Button (actually a movie clip used as a button) Actions
//
volume_mc.onRelease = function() {
switch (mySound.getVolume()) {
// if the volume is all the way up, turn it down
case 100 :
fadeVolume(“DOWN”);
break;
// if the volume is all the way down, crank it up
case 0 :
mySound.start(curPos,0);
fadeVolume(“UP”);
break;
// if the volume’s in between, don’t do nothin’
default :
return;
}
};
//
// Load the Sound
//
mySound.loadSound(“music.mp3”,true);
//
};

[/SIZE]