-
Add Music to Flash
I have this code and Don't know how to link it to a MP3 sound file in the library
var bg_music:Sound = new flashmo_music();
var music_channel:SoundChannel = bg_music.play(0, 10000);
var music_volume:SoundTransform = new SoundTransform();
music_volume.volume = 0.6;
music_channel.soundTransform = music_volume;
sound_control.stop();
sound_control.addEventListener( MouseEvent.CLICK, play_pause );
function play_pause(e:MouseEvent):void
{
music_volume.volume = 0.6;
if( e.target.currentFrame == 1 )
music_volume.volume = 0;
music_channel.soundTransform = music_volume;
e.target.play();
}
Can you please help me i've tried editing it but don't know what to do to it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|