Adding music into a product/button


let's have music playing in background of product on flash. how make button, example speaker icon, when clicked turn off music change image icon line through it?


any appreciated, thanks.

create 2 frame movieclip default icon (eg, speaker no line) in first frame (and stop()) , other icon (eg, speaker line) in 2nd frame.  can use like:

 

soundicon.addeventlistener(mouseevent.click,soundiconclickf);

function soundiconclickf(e:mouseevent):void{

if(soundicon.currentframe==1){

soundicon.nextframe();

// stop sound. soundmixer.stopall() work not best solution

} else {

soundicon.prevframe();

// start sound.

}

}



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account