At 11:00 AM -0400 8/17/01, Roy Crisman wrote:
>I recently discovered that sound channels 1 and 2 are not interrupted by
>the opening of a MIAW, so try those channels for your continuous sounds.
>
>And, take a look at the more advanced sound controls,
>sound(soundchannel).play(), .queue(), .stop(), etc.
Here's a *movie script* handler from the DirectorU.COM Lingo Library which
may be of interest to you:
-- syntax forms which are supported:
--puppetSound whichChannel, whichCastMember
--puppetSound whichCastMember
--puppetSound member whichCastMember
--puppetSound 0
--puppetSound whichChannel, 0
-- note that this routine overrides the built-in "puppetSound" Lingo command
on puppetSound
-- analyze the arguments
param1 = param(1)
if ilk(param1, #integer) then
-- first argument is an integer channel number
case param1 of
0 : -- shut off currently playing sound 1
(sound 1).stop()
exit
1,2,3,4,5,6,7,8 : -- set the sound channel
soundChannel = param1
param2 = param(2)
if param2 = 0 then
(sound soundChannel).setPlayList([])
(sound soundChannel).stop()
else
whichSoundMember = param2
(sound soundChannel).setPlayList([[#member : whichSoundMember,
#preloadTime : 0]])
(sound soundChannel).play()
return soundChannel
end if
otherwise
-- an illegal integer value was passed
beep
end case
end if
if ilk(param1, #string) then
-- assume that the argument is a member's name
-- convert it to a member object reference
memberRef = (member param1)
if memberRef.number = -1 then
-- the member does not exist!
beep
exit
else
param1 = memberRef
end if
end if
if ilk(param1, #member) then
whichSoundMember = param1
-- first argument is a member to play
-- locate a free sound object (channel)
-- override soundChannel 1 as a last resort
repeat with soundChannel = 8 down to 1
if (sound soundChannel).status = 0 then
exit repeat
end if
end repeat
if soundChannel = 0 then
-- there are no free sound channels to use
exit
end if
-- finally, play the desired sound member
(sound soundChannel).setPlayList([[#member : whichSoundMember,
#preloadTime : 0]])
(sound soundChannel).play()
return soundChannel
end if
end puppetSound
--
...---===| Terry R. Schussler |===---...
...---===| Chief Investigator |===---...
on accessResources
coolSites = [ \
"http://macromediaSEMINARS.com/", "http://directorU.com", \
"http://multiuserU.com", "http://flash5U.com", \
"http://dreamweaverU.com", "http://behaviors.com/" ]
gotoNetPage coolSites[random(1, 6)]
end accessResources
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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!]