Flasher Archive

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


Subject: Re: FLASH: Stop/start button for all sounds and animations
From: Joseph Balderson
Date: Thu, 8 Jun 2000 15:52:30 +0100

That's great, got it. And I guess what I really need to know is how to assign a
global variable, say, SOUNDANI, to either 0 or 1, and then all movie clips and
sounds would have built-in actions that would check for this variable before
deciding to play or not.

See, there are 8 main scenes, one for each menu item in the main directory, each
having its own distinct animated background which I would like to be able to
turn off with this play/stop button. Here's how I would do it; I just need a bit
of help with the particulars of the scripting:

INTRO, last frame:
ACTION: set SOUNDANI=1 (for "play"; this way anytime the user reloads the
file it gets reset to play all sounds and animations)

BUTTONS 1-8, button objects:
OVER state: (for button 1)
ACTION: if SOUNDANI=1, play sound
ACTION: if SOUNDANI=0, stop sound/do not play sound

BACKGRDANI 1-8, movie clip objects:
(here I would add a separate Action layer, checking for SOUNDANI the whole
length of the timeline)
ACTION: if SOUNDANI=0, stop (this movie clip)
ACTION: if SOUNDANI=1, play/continue and loop
(So if the user presses the stop/play button in the middle of the backgrd ani,
it will freeze right there)

SOUNDANI, graphic object:
Frame 1: has STOP button object
Frame 1 ACTION layer: stop
Frame 1 ACTION layer: if SOUNDANI=1 go to frame 2
Frame 2: has PLAY button object
Frame 2 ACTION layer: stop
Frame 2 ACTION layer: if SOUNDANI=0 go to frame 1
(basically, if the stop button is displayed and all sound&ani is stopped, change
to display the PLAY button, and vice versa)

STOP, button object:
DOWN state, ACTION: set SOUNDANI=0

PLAY, button object
DOWN state, ACTION: set SOUNDANI=1

Thanks so much for your help ``-���-��, and anyone else that cares to comment.


Joseph Balderson

``-���-�� wrote:

> Hello Joseph
>
> > My question is: how do I create one button to stop/start all background
> > animations and all sounds? The logo and background animations are movie
> > clip objects, and the sounds are all activated by buttons, residing in
> > button objects.
>
> you would have to create a button
> that applies a stop action to the main timeline,
> as well as two "tell target" actions which stop the animations
> of the logo and the background ( clips need appropriate instance names )
>
> Begin Tell Target ("logo")
> Stop
> End Tell Target
> Begin Tell Target ("background")
> Stop
> End Tell Target
>
> > I figured that a dual state button would be needed,
> > something that would be a play button like (>) when all is stopped, and
> > a stop button ([]) when all animations and sound are active. But what
> > the ActionScript for something like that would be has me puzzled.
>
> you create a movieclip
> having the stop button reside on the first frame and the play button on the
> second
> ( use a stop action for both frames so it doesn`t loop ) ...
> an action you would use for this purpose could look like this :
>
> On (Release)
> Go to and Stop (2)
> Begin Tell Target ("../logo")
> Stop
> End Tell Target
> Begin Tell Target ("../background")
> Stop
> End Tell Target
> Begin Tell Target ("../") ---- > targetting the
> main timeline
> Stop
> End Tell Target
> End On
>
> if you have still questions
> I can make you a quick fla to showcase it.
>
> good luck
>
> dom
> -=Visuality=-
>
> flasher is generously supported by...
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> flashforward2000 and the Flash(tm) Film Festival
> July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
> www.flashforward2000.com
> Produced by United Digital Artists and lynda.com
> Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
> shockwave.com and Electric Rain.
> 1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
> Register before June 15 and save $200!!-- www.flashforward2000.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To unsubscribe or change your list settings go to
> http://www.chinwag.com/flasher or email helpatchinwag [dot] com


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 15 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: New subscriber, Victor Villen

Replies
  FLASH: Stop/start button for all sounds , Joseph Balderson
  Re: FLASH: Stop/start button for all sou, ``-���-��

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