PDA

View Full Version : Script Warning Occurs???


mkoz
03-08-2008, 10:22 PM
I'm trying to script an audio clip to load from the library when the button is clicked this warning occurs when in publish the file:

WARNING: Actions on button or MovieClip instances are not supported in ActionScript 3.0. All scripts on object instances will be ignored.


My script is:

stop();
var sndTrack:BigBlueSea = new BigBlueSea();
var sndControl:SoundChannel;
sndControl = sndTrack.play(0,999);


on_btn.addEventListener(MouseEvent.CLICK, soundON);
off_btn.addEventListener(MouseEvent.CLICK, soundOFF);

Any ideas???

Durnus
03-13-2008, 05:41 PM
The reason this is happening is probably because you put that code on the button. (I think this thread belongs in the AS3 forum, because you are using AS3 in this example.) Also, you don't have functions soundOFF and soundON defined.

Code must be put either on a frame or in a separate file. :D

squall
03-14-2008, 08:33 AM
What kind of script?

_____________________
elliptical interval training (http://www.abc-of-fitness.com/fitness-and-heart/select-aero-exercises/circuit-interval.asp)