Flasher Archive

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


Subject: Controlling Sound in a Loaded Movie
From: jwoodw - Jeffrey Woodward
Date: Wed, 07 Feb 2001 23:36:55 -0000

Sorry 'bout the repost folks, but I haven't had any responses yet and
thought maybe it got lost in the haze...


-----Original Message-----
From: jwoodw - Jeffrey Woodward [jwoodwatacxiom [dot] com (mailto:jwoodwatacxiom [dot] com)]
Sent: Monday, February 05, 2001 4:10 PM
To: flasher from chinwag
Subject: [flasher] Controlling Sound in a Loaded Movie


Hi all,

In experimenting with sound in Flash 5 I've reached a stumbling block that
has me perplexed. I've got a movie clip in which I created a sound object
using the Actionscript Reference Guide's suggestions. I imported a sound,
selected the sound in the Library and chose "Linkage" from the Options menu
to give it the identifier "mySound", and in the first frame of the movie
included the following script:

s = new Sound();
s.attachSound("mySound");

Just for testing, I created a button in this movie with script to start the
sound as follows:

on (release) {
s.start();
}

When played alone, this movie works fine. The sound begins when the button
is released.

The problem comes when I try to load this movie into another movie and
target the sound to start. I load the movie into level 1 as follows...

loadMovieNum ("sound.swf", 1);

...and then try to target the sound with a button like this:

on (release) {
_level1.s.start();
}

The sound won't start with this code, and not even the test button in the
level 1 movie will start the sound. I've gotten it to work by just loading
the sound into a frame and targeting the frame label with a "gotoAndPlay"
action but would like to target it as an object in order to play around with
the volume and pan controls.

Thanks in advance for any suggestions!
Jeff


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Chinwag site carries a wealth of Flash resources.
Find useful links, suggested reading and archives at:

** http://www.chinwag.com/flasher **
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You are subscribed to flasher as: jwoodwatacxiom [dot] com
To unsubscribe, email leave-flasher-479018Gatlists [dot] chinwag [dot] com



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