Flasher Archive

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


Subject: Re: FLASH: Sound help..please
From: Marc Hoffman (Dart Frog Media)
Date: Thu, 30 Sep 1999 07:21:49 +0100

At 09:26 AM 9/29/99 , you wrote:
>Hello,
>
>I hope someone can help me out with this cos it's buggin me.
>I have a button that says 'stop all sounds' if you click it it stops all the
>sounds (which is great) But i also have another button and when you click it
>the playhead jumps further down the time line (it's a 'skip intro' thing)
>The problem is if you click the button to stop the sounds then click the
>button to jump down the time line the sounds start playing again. Is there
>a way to stop these sounds from coming back on?


This is a bit complicated, but works well.

Make a 2-frame movie clip with instance name "shell" and put it on the main
timeline (you must avoid scenes for this to work correctly). Also put a
stop action in each of the two frames.

Make two other movie clips, and put one in each frame of "shell." Give them
each the same instance name, "sound." The second movie clip "sound" can be
just a single empty frame. The first movie clip "sound" should have
labeled frames with stop actions in each, and each of those labeled frames
should contain one of the sounds you want in your movie. For example, one
frame might be labeled "whistle" and would have a whistle sound in it. Be
sure to start it with a few blank frames (helps with tellTargetting).

Whenever you want to play a sound, use TellTarget as follows (this could be
a button action or a frame action):

TellTarget (/shell/sound)
GoTo (label: whistle)
End TellTarget

When you want your sounds turned off, use this action (button or frame action):

TellTarget (/shell)
GoTo (frame number: 2)

To make sounds active again:

TellTarget (/shell)
GoTo (frame number: 1)

Why it works: When /shell is stopped at frame 1, all actions that
TellTarget /shell/sound (label: x) will cause sound x to play. But when
/shell is stopped at frame 2, the tellTargets won't find sound x because
it's not in the path /shell/sound. So the action will fail but the only
consequence will be that the sound doesn't play. You may also need a "stop
all sounds" if you want immediate silence.



Marc Hoffman

marcatdartfrogmedia [dot] com (mailto:marcatdartfrogmedia [dot] com).
My Flash Portfolio: <http://www.dartfrogmedia.com/sampler>
(featured in Flash 3 Web Animation, by Ken Milburn)

------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratchinwag [dot] com. Problems to: helpatchinwag [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-manageratchinwag [dot] com


Replies
  FLASH: Sound help..please, Hayden Brown

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