Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editing Music

Status
Not open for further replies.

martinb7

Programmer
Jan 5, 2003
235
0
0
GB
is there any way of editing music in flash so it starts where you want in the song? - by using actionscript

e.g 10 seconds into the song?

 
hei,

firstSound.start([SecondOffset,loop])

...is the theoretical code for what you want. Create the sound object, then start it like above. But the ammount of seconds in the first postion in the brackets and how many time you want to loop it in the second position. That's it.

Adrian
 
is that in milliseconds or normal seconds??
 
i cant get that to work - can you make a .fla and put it on your website so i can download it and see how it works?

Thanx
 
if you can 10 seconds of silence then it would be simple to write a piece of code to loop for 10 seconds with setvolume = 0 followed by setvolume = 100.

Frame 1
now = getTimer();

Frame 3
sound_off = now + 10000; //10 secs
if (sound_off<getTimer()){
mysound.setvolume(0);
gotoAndPlay(2);
}else{
mysound.setvolume(100);
}
 
We're talking about imported sound. In the library set the linkage settings and give the sound an id. Then do this:

firstSound = new Sound();
firstSound.attachSound(&quot;yourSoundID&quot;);

firstSound.start(10, 1);
 
it now works, but how do i make it so it doesn't loop?

Thanx
 
it shouldn't loop if you put a '1' in the second position in the brackets of the .start function.

adrian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top