Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]

Subject: Re: FLASH: Background music with a button?
From: Marc Hoffman
Date: Mon, 31 Aug 1998 16:16:18 +0100

At 09:05 AM 8/31/98 +0000, you wrote:
>Hi list!
>I want to have background music in an .swf file and want to have a
>start/stop button to the sound
>how do I do?

Here's one way:

FIRST: create a button to associate with the particular sound loop, with
its up, over, release, and hit states. Exit the button editing window.

SECOND: create a symbol that's a movie clip. Give it three frames and
three layers.
In layer 1, place the button in frame one.
In layer 2, frame 1, place your sound. I start with it off, so frame one's
"properties" (under the "sound" tab) has the specific sound listed but Sync
is set to "Stop." Frame two's properties lists the sound, Sync is "event"
and Loops is set high (I use 999). Effect can be whatever you like. I
often create a fade in for the first second or two of the sound. (Note: to
change it so the sound is On by default, just swap the actions of the two
frames in this layer.) Frame 3 has no keyframe.
Layer 3 holds frame actions. Frame 1 says "Stop." Frame 2 says "Stop."
Frame 3 says "Go to Frame 1."
Now put the playback head over frame 1 and double click the button on the
stage. Assign it this action:
On (Release)
Go to Next Frame
End On
Exit the editing window. Place the clip you've just made anywhere on your
movie stage. It can even move around if you want it to. When the user
clicks on it, it will either start or stop the sound that has been placed
in it. It won't affect any other sounds.

NOTE: sometimes it's best to put a sound in its own movie, especially if
it's a large file size. In that case, just construct the above clip as a
separate movie and load it on top of your main movie.

Marc Hoffman
<marchofatjps [dot] net (mailto:marchofatjps [dot] net)>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Create your own music at the Poison Dart Frog Music
Digital Audio Playground: <http://www.jps.net/dartfrog>

To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com

  FLASH: Background music with a button?, Mikael Johansson

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]