Crikey wrote:
> Thanks Urami,
>
> It looks and sounds very logical, but I just can't get
that to work. I can't
> even get the initial sound to play let alone control its
volume. Am I missing
> something painfully obvious here?
>
> I've made the empty MC and assigned the script to it. Do
I need the have the
> sound file on the stage also?
>
> Sorry for being a pain, but scripting is not my thing.
not to worry, not a pain :)
open new file CTRL N, import sound (say two files)
Once you get the sound, open the library CTRL L and assign
LINKAGE name to each. To do it, right click first sound, go
to
LINKAGE - select the box - EXPORT FOR ACTION SCRIPT
In the Identifier box type some name, call it Sound1
Do the same thing with second sound, linkage, id name Sound2
On timeline frame place:
var s1:Sound = new Sound(mc1);
s1.attachSound("sound1");
s1.start(0,999);
var s2:Sound = new Sound(mc1);
s2.attachSound("sound2");
s2.start(0,999);
It will run two sounds in the same time, you can arrange the
action
as you like, it's just for the demo purpose.
Last thing is to make the movie clip. CTRL F8 key - select
movie clip.
On top of the screen above the timeline click the "Scene 1"
link to
get out of the movie clip authoring mode.
Again open library CTRL L and find the clip you just made.
Drag it on stage, CTRL D to duplicate it. We need two copies.
Now select that clip and hit CTRL F3 to open properties
panel, give it
instance name mc1 and the second clip same thing just call it
mc2
Flash does not care whether its same clip and tens of copies,
it only
refer to it by instance name and we need two to differentiate
the
targets for the sound object.
Now if you use any volume control actions like
s2.setVolume(20) or
sound1.setVolume(70) it will apply to each sound
individually.
Using the target clip does it --> (mc1);
Let me know if you still have problem getting it to work.
--
Regards
Urami
--
Happy New Year guys - all the best there is in the 2006 :)
<urami>
http://www.Flashfugitive.com
</urami>
<web junk free>
http://www.firefox.com
</web junk free>