
Welcome Guest
|
|
|
#1
|
||||
|
||||
|
can't get soundclip to play when i click on a button (movieclip)
i can't get a soundclip to play when the mouse is OVER an button (not a normal button, but a movieclip!)
satan = instance name of the button (MC) CLAVE.WAV = name of the soundclip Code: satan.onRelease = function(){ // this one works fine!!! gotoAndStop("meny"); } onClipEvent(load){ // here i get the error "clip events are permitted only for movie clip instances" lyd = new Sound(); lyd = attachSound("CLAVE.WAV"); } satan.onRollOver = function(){ // play the sound "lyd" when mouse is over, works fine!! lyd.start(); } |
|
#2
|
|||
|
|||
|
Hi thh022.
I assume you are writing your code on the main timeline as the onClipEvent method only works when the code is attached to a movieclip. try something like this. i tested it and it works fine for me. Code:
var lyd:Sound = new Sound(satan);
lyd.attachSound("CLAVE.WAV");
satan.onRollOver = function(){ // play the sound "lyd" when mouse is over, works fine!!
clSound.start();
} |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| movieclip button... how to define a smaller hit area?? | dpcdpc11 | ActionScript 3.0 |
1 | 11-04-2008 05:35 PM |
| button to play slideshow movieclip | sammie | Newbies |
6 | 10-29-2006 11:03 PM |
| Preloader w/play button tutorial? Adding play button to preloader on swf file. | oicdn | Flash 8 |
1 | 10-23-2006 06:10 AM |
| Detecting Movie Parameters \ Sound Play Button Problem | MathieuGPL | Flash MX ActionScript |
2 | 07-26-2005 06:09 PM |
| play all button | Captain Kirk | Flash MX ActionScript |
0 | 07-17-2005 01:41 AM |



