Copy link to clipboard
Copied
hello i need help in sound adding for flash application project i will explain : i making app for iPad and i need two sounds for background use for when i click its able to turn on/off its about background sound and dubbing sound. my project is a children book for iPad if anyone can please help me in how i making the sound work as i want Thank you
Copy link to clipboard
Copied
add a sound file to your library and assign it a class name, eg BG_Sound1.
you can then use:
var bg_Sound1:BG_Sound1 = new BG_Sound1();
var bg_Sound1_sc:SoundChannel;
toggle_bgSound1.addEventListener(MouseEvent.MOUSE_DOWN,bgSound1F);
function bgSound!F(e:MouseEvent):void{
if(!bg_Sound1_sc){
bg_Sound1_sc = bg_Sound1.play();
} else {
bg_Sound1_sc.stop();
bg_Sound1_sc = null;
}
}
likewise for your 2nd sound.
Copy link to clipboard
Copied
its works for an i pad ? because i tried to do what u sent and did not work
Copy link to clipboard
Copied
did you test in flash pro first?
and for stopping your sound see your other thread.
Copy link to clipboard
Copied
i have 2 scene in the firsts one i have sound and when i get to the second scene i want the sound from scene 1 to stop how can i do that ?
Copy link to clipboard
Copied
Scenes are awful and you should never use them. What kglad said will work across all devices...
Find more inspiration, events, and resources on the new Adobe Community
Explore Now