This content has been marked as final. Show 5 replies
Sorry, i'm VERY new to flash and I'm trying to modify a script. I'm afraid I need a little more information. The "sounds layer" starts playing the music on frame 336 of the timeline. Selecting that frame/layer on the timeline shows me which sound file is being played and that it is set to repeat. However, I don't see a label for a "sound object" anywhere... nor a script that would start the music. I've been working under the assumption that the music is just part of the timeline. Is this incorrect?
well it can be 'embedded' into the timeline, but it's not the idea way of playing sounds, particularly a music file, and it will eat up a lot of memory to store the sound file (like music) in the swf. Better to use a 'Sound Object' like Dave says above, you have more control of it, and can load the Sound in even 'stream' it from an external file.
Hit F1, and goto the ActionScript class references and look up 'Sound'. Also you'll find that the Flash Help manual is a huge resource to get you going, and has an amazing amount of information on evenything to do with Flash.
Are you using AS3?
Ahhh, ok.. that makes sense to me. Thanks! I'll delete that layer and learn how to add the sound back in a more functional manor.
Thanks for your help!
great, you're welcome :)
I just now realized your probably using AS2 since you'd been able to attach the code above to an Object instance. so let me give you a quick rundown on how you can do this.
you add a sound by loading it in from a file (let's assume that, and that the file is in the same folder as the swf file) then you can set you buttons to control that sound instance. later you can load a different sound into the same Object and use the same buttons to control it. So the code to do this will look something like this: