home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sverigejakten
/
sverigejakten.iso
/
SUCCESS.DIR
/
00007_Script_global
< prev
next >
Wrap
Text File
|
2003-08-12
|
2KB
|
54 lines
global animation_script
-- object playing lip-synchronized sound
on lipSync
set temp_sprite=value(item 1 of animation_script)
set temp_actor=item 3 of animation_script
preload member (temp_actor &"m1")
preload member (temp_actor &"m2")
preload member (temp_actor &"m3")
preload member (temp_actor &"m4")
preload member (temp_actor &"m5")
--preload member (item 4 of animation_script) of castlib "sound"
set the member of sprite temp_sprite=member (temp_actor &"m1")
set the visible of sprite temp_sprite=1
puppetsound 1, member (item 4 of animation_script) of castlib "sound"
updatestage
set temp_mousedown=the mousedown
set temp_ticks=the ticks
repeat while soundbusy(1)=1
if the mousedown> temp_mousedown then set temp_mousedown=1
if the mousedown< temp_mousedown then
set animation_script=#cancel
puppetsprite temp_sprite, 0
go to "end"
exit repeat
end if
-- ##disabled for speed if true_realtime=1 then mapRealTime
set temp_goalmouth=(random(4))+1
set temp_mouth=2
repeat while (temp_mouth-1)<(temp_goalmouth-1)
if temp_ticks < the ticks-5 then
set the member of sprite temp_sprite=member (temp_actor &"m" &temp_mouth)
updatestage
set temp_ticks=the ticks
end if
set temp_mouth=temp_mouth+1
end repeat
repeat while (temp_mouth-1)>0
if temp_ticks < the ticks-5 then
set the member of sprite temp_sprite=member (temp_actor &"m" &temp_mouth)
updatestage
set temp_ticks=the ticks
end if
set temp_mouth=temp_mouth-1
end repeat
end repeat
sound stop 1
updatestage
end