Use AS operation sound

xiaoxiao2021-03-06  92

1. Set a link name for the sound (used for AS call)

2. Add this code to the corresponding button:

On (Release) {

SND = New Sound ();

SND.Stop (); // Stop all sounds, this is very important, otherwise more times, the sound will overlap

SND.attachSound ("Set to Sound Link Name";

SND.Start (0);

}

This is the sound plus the button

Sound.stop (["Sound Link Name]) If you do not add parameters, you will stop all the sounds.

There is also a global variable in {} in Flash.

转载请注明原文地址:https://www.9cbs.com/read-96407.html

New Post(0)