Skip to main content
Participant
June 28, 2015
Question

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 chi

  • June 28, 2015
  • 1 reply
  • 362 views

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

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
June 28, 2015

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.

Participant
June 29, 2015

its works for an i pad ? because i tried to do what u sent and did not work

kglad
Community Expert
Community Expert
June 29, 2015

did you test in flash pro first?

and for stopping your sound see your other thread.