------ Events ------
on prepareframe
if search=false then
getcuepoinid cuepointname
end if
end
on ExitFrame me
if member (sprite(DirectmediaSprite).member).type = #TBDIRECTMEDIA and cueid <>-1 then
if isPastCuePoint(sprite DirectmediaSprite, cueid) = false then
go the frame
else
case(MyAction) of
"Go to NextFrame": Go the Frame+1
"Go to Next Marker": Go Next
"Go Previous Marker": Go previous
"Go Loop": Go Loop
"Quit": quit
end case
end if
end if
end ExitFrame
------ Events ------
---get cuepoint id--
on getcuepoinid cuename
if member (sprite(DirectmediaSprite).member).type = #TBDIRECTMEDIA then
nameslist=the cuepointnames of member(sprite(DirectmediaSprite).member)
repeat with i=1 to nameslist.count
if cuename= nameslist[i] then
set search=true
cueid=i
else
cueid=-1
end if
end repeat
end if
end
---get cuepoint id--
------ Get Behaviour Description List ------
on getBehaviorDescription me
return
"This Behavior will hold on the frame till the specified Cuepint of a DirectMedia Sprite is past" & RETURN & RETURN &
"Parameters." & RETURN &
"* DirectMedia Sprite" & RETURN &
"* Cuepoint Name" & RETURN &
"* Action(go NextFrame or Go NextMarkeror Go Previous Marker or Go Loop or Quit)"
end getBehaviorDescription
------ Get Behaviour Description List ------
------ Get Behavior Description List ------
on getPropertyDescriptionList me
if the currentspritenum <> 0 then exit
thedirectmediaspritelist = searchDirectmediaSprites(me)
propslist=[:]
if thedirectmediaspritelist.count() > 0 then
SetaProp propslist, #DirectmediaSprite, [#comment:"Directmedia Sprite",#format:#integer,
#range: thedirectmediaspritelist,#default: thedirectmediaspritelist[1]]
else
SetaProp propslist, #DirectmediaSprite, [#comment:"Wait for Which Directmedia Sprite",#format:#integer,
#default: 1]
end if
SetaProp propslist, #cuepointname, [#comment:"Wait for Which CuePonint(Name of Cue Point",#format:#String,
#default: "enter Name here"]
SetaProp propslist, #MyAction, [#comment: "What Next?" ,#format:#String,
#range:["Go to NextFrame","Go to Next Marker","Go Previous Marker","Go Loop","Quit" ],#default:"Go to NextFrame"]
return propslist
end getPropertyDescriptionList
------ Get Behavior Description List ------
------ Can be attached to only Frame script ------
on isOKToAttach (me, aSpriteType, aSpriteNum)
case aSpriteType of
#script:
return true
end case
end if
end isOKToAttach
------ Can be attached to only Frame script ------
------ Search for DirectMedia Member on the Stage ------
on searchDirectmediaSprites me
set thedirectmediaspritelist = []
repeat with i=1 to the lastchannel
if sprite(i).member.type = #TBDIRECTMEDIA then
thedirectmediaspritelist.append(i)
end if
end repeat
return thedirectmediaspritelist
end
------ Search for DirectMedia Member on the Stage ------
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA