I decided to cross post this info since it has come up a couple of times on
various lists without a satisfactory resolution. And felt that others might
find this information useful. I provided a small portion of the solution
while the real credit goes to Miny Hunter for implementation and testing as
well as Colin Moock who provided the background information for this
solution.

Sincerely
Mark R. Jonkman

Minty Hunter's results:

Controlling a Flash Sprite's volume: SOLVED!

A while ago I asked about this (the docs wrongly state volume as a Flash
sprite property), and while there are options to have Director fire off code
inside the Flash sprite, I didn't want the animators to have to worry about
making sure code was inside their Flash files.

Then Mark Jonkman suggested:

> If you create a new sound object in Flash and don't give it a
> target:
>
> _global.SoundManager = new Sound();
>
> then theoretically, I haven't tested this. But you can control all sounds
in
> Flash globally through that sound object because it doesn't have a target.
I
> got that from Moock's ActionScript the Definitive Guide 2nd edition.

Mark suggested creating the sound object in the .fla, but I figured
I'd give DMX's new access to Flash objects a go.

And what do you know: it works!

The following on a Flash sprite in Director will make the volume very soft:

property spriteNum
on beginsprite me
 obj = sprite(spriteNum).newObject("Sound")
 obj.setVolume(10)
end

Thanks Mark (and Colin Moock!).

Cheers,
Minty


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to