Flasher Archive

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


Subject: RE: [flasher] Re: Controlling Sound in a Loaded Movie
From: jwoodw - Jeffrey Woodward
Date: Thu, 08 Feb 2001 23:56:10 -0000

Read my code again. Isn't that what I did?

Confused,
Jeff


-----Original Message-----
From: Muzak [muzakatpandora [dot] be (mailto:muzakatpandora [dot] be)]
Sent: Wednesday, February 07, 2001 7:26 PM
To: flasher from chinwag
Subject: [flasher] Re: Controlling Sound in a Loaded Movie


You have to secify the level you want the sound object to *live in*
When using/creating a sound object in a different level movie, use 'this' as
the target when creating the sound object

//Level1 movie
s = new Sound(this);
s.attachSound("mySound");

//start sound from main timeline within the level 1 movie
on (release) {
s.start();
}

//start sound from level0 movie
on (release) {
_level1.s.start();
}

HTH,
Muzak

----- Original Message -----
From: "jwoodw - Jeffrey Woodward" <jwoodwatacxiom [dot] com>


> 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();
> }
> 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 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]