well well, i made a tutorial on it here:
http://legendofkrystal.com/forum/viewtopic.php?f=7&t=1327 It is as2 and the person I made it for use as3 so its good to see that it was useful after all. It might be hard to undersand it clear enough so please ask if you dont understand. Btw are you from sweden? Why I wonder is because Luft = Air and Mallow = the half of the word marsmallow which is same in swedish.
Edit: why not just post it here:
"Random, the random function is pretty good to know, not only for sounds but alot other things as well. To make the sounds play randomly is pretty easy, you need:
A action on the frame you want the sound that sais:
"_root.soundbox1.gotoAndPlay(2);"
A soundbox (movieclip, Instance name = soundbox1) on the same frame which contains a few lines of code and the sounds. First frame inside the movieclip type "stop();", second frame type:
- Code: Select All Code
function randRange(min:Number, max:Number):Number
{
var randomNum:Number = Math.round(Math.random() * (max - min)) + min;
return randomNum;
}
var say;
say = randRange(3, 5);
gotoAndStop(say);
gotoAndStop(say);
Then create 3 more frames which contains "stop();" and a sound. "say = randRange(3, 5);" means like that it will go to a frame in the movieclip 3, 4 or 5. if you want more sounds then increase the "5" in the code and add the same amount frames to the timeline whit sound and code as well."