I have a movieclip that is acting as a button. I want to apply a sound to it but Im not exactly sure how to go about this. I am using a HitTest and making it go either to the PrevFrame or the NextFrame depending if I am rolling over the movieclip or not… Any way, should I use some sort of AS to play a sound clip on an onRollOver or should I insert the sound clip in a frame?
Also, does anyone know a good site to get free sound bytes that are good for Flash sites? Thanks
AS is the way to go. The easiest way is to create a Sound object and have it load that particular sound you want the movieclip to play when rolled over. Then, you assign an onRollOver handler to the movieclip and make that handler play the sound file.
Example code on the timeline which your button is in:
theSound = new Sound(yourmc);
theSound.loadSound("beep.mp3");
// or, attaching it from the library: theSound.attachSound("beep"), where beep is the linkage identifier
yourmc.onRollOver = function(){
theSound.start(0,1);
}
Thanks voets, while ur online can I ask u another question (you dont like PM right?)… Any way here it is.
I want to make it so when I click a button a movieclip transitions in (just by playing the first frame of the movieclip) but I also want to make it so when you push any other of the main buttons (buttons I have specified), it transitions out (plays a different frame of the current movieclip) and then the other moviecip transitions it.
I figured I could just compose each movieclip (containing several frames, on frame for a transition in, one frame for the standing still frame, and several frames for the transition outs). I need several frames for the transition outs because I will attach a gotoAndStop on EnterFrame on all of the last frames of the movieclip in the transition out frames.
this might not make a lot of sense but I basically want to be able to make a movieclip transition in and then transition out when another button is pushed… Is there a simpler method of doing this
By the way I want the transition in and out to just play a movieclip (not using AS to animate the graphic). Thanks\
Thanks for the link, it will take me a while to get that… By the way my first website EVER using FLash or Photoshop (that is by the way the only program I used for graphics) will be done soon. I’m really proud of my first work considering I know absolutly no AS or anything. I mean had to learn what a ‘tween’ was
I would really like ur opinion so in a couple week can I PM u a link or should I jsut post it in the site check section.
I have been working 2 months straight on this thing so I would really like to know what you think.