flash actionscript:
:brokenheart; I have been trying to get this script to work for three days!! I have a wav sound in my movie clip...to control it i have a play and stop button. I have tried making the sound an "instance" and attaching/linking. WHen i export nothing happens...my sound does not play from clicking the play button/nor does it stop....nothing happens! Please help!Text I have tried this: Soundsample4 = newound(this); Soundsample4 = attachSound ("Voice4") Soundsample4.start(0,1); and in the button "start": on(release) {Soundsample_4.start(); } and then the"stop" button: on (release) {Soundsample_4.stop("Voice4"); }
This here usually works for me: mySound=new Sound(); mySound.loadSound("Voice4", false); and in the button "start": on(release) { mySound.start(0,1); } and then the"stop" button: on (release) { mySound.stop(); }
Originally posted by: Erinlong1 :brokenheart;<BR><BR>I have been trying to get this script to work for three days!!<BR>I have a wav sound in my movie clip...to control it i have a play and stop button. I have tried making the sound an "instance" and attaching/linking. WHen i export nothing happens...my sound does not play from clicking the play button/nor does it stop....nothing happens!<BR><BR>Please help!Text What I see in your code is two typos...mb you have it right in your script but I can't assume that. Soundsample4 = newound(this) <---- should be new Sound(); Dont know why you have 'this' in there. and SoundSample4 = attachSound("Voice4"); <--- should be SoundSample4.attachSound("Voice4"); Then Voice4 must be the name of the sound file in the LINKAGE Properties dialog box. If you do not specify the LINKAGE property it will never work.
:D thank you so much! i am going to try your code! i will let you know how it goes!
:confused; I still cannot get the sound to play.....I tried this...and nothing works...... mySound=new Sound(); mySound.loadSound("Voice4", false); and in the button "start": on(release) { mySound.start(0,1); } and then the"stop" button: on (release) { mySound.stop(); }
Well mySound in the button my not be defined. You should make the mySound global to make sure the path is consistant. _global.mySound = new Sound(); _global.mySound.loadSound("Voice4",false); on(release) { _global.mySound.Start(0,1); } Also, did you remember to set up the Linkage Properties for the sound "Voice4" ? then make sure the upper/lower case of the names are exactly the same.
Don't see what you're looking for? Try a search.
|