Wait for SWA Member finishes Playing(sprite as reference)
Added on 6/19/2000
Compatibilities:
This item has not yet been rated
Wait for SWA Member finishes Playing(sprite as reference)
---- written for Director 8 ---
---- Kumar.K ----
---- kumark@icode.com ----
------ Custom Properties ------
property theSprite,MyAction
-- Events --
on ExitFrame me
if float(the duration of member (sprite(theSprite).member)) > the currentTime of sprite theSprite then
case MyAction of
"Go NextFrame": Go the frame +1
"Go Next Marker":Go Next
"Go Previous Marker":Go Previous
"Exit":quit
end case
else
go the frame
end if
end ExitFrame
------ Events ------
------ Get Behavior Description List ------
on getPropertyDescriptionList me
if the currentspritenum <> 0 then exit
SWASpriterlist = searchSWAMember(me)
if SWASpriterlist.count() > 0 then
set description = [:]
addProp description, #theSprite, [#format:#integer, #comment: "Wait for Which SWA(Shockwave Audio) Sprite ?",
range:SWASpriterlist,#default:SWASpriterlist[1]]
addProp description, #MyAction, [#format:#String, #comment: "Action(What after Sound Finishes Playing):",
#range:["Go NextFrame","Go Next Marker","Go Previous Marker","Exit"],#default:"Go NextFrame"]
return description
else
exit
end if
end getPropertyDescriptionList
------ Get Behavior Description List ------
-- Get Behavior description --
on getBehaviorDescription
return "This Behavior Waits for the SWA Sprite to finish Playing." & RETURN & RETURN &
"Parameters" & RETURN &
"* SWA Sprite." & RETURN &
"* Action."
end
------ Availbale for only frame Script ------
on isOKToAttach (me, aSpriteType, aSpriteNum)
case aSpriteType of
#graphic:
return false
#script:
return true
end case
end isOKToAttach
------ Availbale for only frame Script ------
------ Search for SWA Member ------
on searchSWAMember me
SWASpriterlist = []
repeat with i=1 to the lastchannel
if member(sprite(i).member).type=#swa then
SWASpriterlist.append(i)
end if
end repeat
return SWASpriterlist
end
------ Search for SWA Member ------
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA