Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-20-2007, 03:00 PM   #1
Registered User
Join Date: Jan 2007
Posts: 20
Default Adding Audio to Movie Clip Button

I am wondering how to add a sound to an animated movie clip button that only plays once. With the code that I am using when you mouseOver it plays the sound and animation, then when you move your mouse off it plays backward and when it hits frame one it plays the sound again. Thanks in advance.


onClipEvent (enterFrame) {
	if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
	} else {
rfarley1 is offline   Reply With Quote
Old 05-20-2007, 07:10 PM   #2
What's up pussycat?
matbury's Avatar
Join Date: Dec 2006
Location: Toronto, Canada
Posts: 1,990

If you're loading the sound externally:

onClipEvent (enterFrame) {
	if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
		var s:Sound = new Sound();
		s.loadSound("yourExternalMP3File.mp3", true);
	} else {
		var s:Sound = new Sound();
		s.loadSound("yourExternalMP3File.mp3", true);
Otherwise you can just put the sound on the frame that you're going to and specify it to play only once on the properties inspector.
matbury is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
move movie clip on button clip adallas ActionScript 2.0 0 06-18-2006 07:16 AM
Movie clip in button ebross67 Other Flash General Questions 2 06-02-2006 07:43 PM
ADVICE anyone? random movie clip kirayamato ActionScript 1.0 (and below) 1 04-17-2006 07:59 PM
Loading images in different frames.. nchagial ActionScript 2.0 22 12-21-2005 08:06 AM
how to put a button into a movie clip to drag ausdag Simple Stuff (Newbies) 9 03-27-2003 09:37 AM

All times are GMT. The time now is 05:20 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.