------ Events ------
on EnterFrame me
if WhereTo = "On EnterFrame" then
DoAction
end if
end EnterFrame
on ExitFrame me
if WhereTo = "On EnterFrame" then
DoAction
end if
end ExitFrame
on MouseUp
if WhereTo = "On MouseUp" then
DoAction
end if
end MouseUp
on MouseDown
if WhereTo = "On MouseDown" then
DoAction
end if
end MouseDown
on MouseEnter
if WhereTo = "On MouseEnter" then
DoAction
end if
end MouseEnter
on MouseLeave
if WhereTo = "On MouseLeave" then
DoAction
end if
end MouseLeave
------ Events ------
------ Get Behavior Description List ------
on getPropertyDescriptionList me
flashmememberlist = searchflashsprite(me)
if flashmememberlist.count() < 0 then exit
propslist=[:]
SetaProp propslist, #FlashSprite, [#comment:"Flash Sprite",#format:#integer, #range: flashmememberlist,#default: flashmememberlist[1]]
SetaProp propslist, #MyAction, [#comment: "Action", #format:#String,#range:["Play","Pause","Stop","Rewind"], #default:"Play"]
if the currentspritenum = 0 then
SetaProp propslist, #WhereTo, [#comment: "Where To Attach",#format:#String, #range:["On EnterFrame","On ExitFrame"],#default:"On EnterFrame"]
else
SetaProp propslist, #WhereTo, [#comment: "Where To Attach",#format:#String, #range:["On MouseUp","On MouseDown","On MouseEnter","On MouseLeave"],#default:"On MouseUp"]
end if
return propslist
end getPropertyDescriptionList
------ Get Behavior Description List ------
------ Check Whether Flash Member Availabale on the Stage------
on isOKToAttach (me, aSpriteType, aSpriteNum)
flashmememberlist = searchflashsprite(me)
if flashmememberlist.count() > 0 then
case aSpriteType of
#graphic:
return true
#script:
return true
end case
end if
end isOKToAttach
------ Check Whether Flash Member Availabale on the Stage------
------ Search for Flash Member on the Stage ------
on searchflashsprite me
set theflashmemlist = []
repeat with i=1 to the lastchannel
if sprite(i).member.type = #flash then
theflashmemlist.append(i)
end if
end repeat
return theflashmemlist
end
------ Search for Flash Member on the Stage ------
------ Custom Function to Perform the Action ------
on DoAction
Case (MyAction) of
"Play":
Sprite(Flashsprite).Play()
"Pause":
Sprite(Flashsprite).Hold()
"Stop":
Sprite(Flashsprite).Stop()
"Rewind":
Sprite(Flashsprite).Rewind()
Sprite(flashsprite).Play()
End Case
end
------ Custom Function to Perform the Action ------
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA