--- Get Behavior Description List ---
on getPropertyDescriptionList me
VectorMembersList=searchVectorMember (me)
descriptionlist = [:]
spriteassignlist=["Mouse Up","Mouse Down", "Mouse Enter","Mouse Leave","Mouse Within"]
frameassignlist=["Exit Frame","Enter Frame"]
if VectorMembersList.count > 0 then
addprop descriptionlist,#sourcemember,[#comment:"Source Vector Shape Cast member :", \
#format:#String,#range:VectorMembersList,#default:VectorMembersList[1]]
else
addprop descriptionlist,#sourcemember,[#comment:"Source Vector Shape Cast member :",#format:#Graphic,#default:1]
end if
addprop descriptionlist,#AntialiasProp,[#comment:"Set AntiAlias property Of Vector Member To :",#format:#boolean,#default:True]
addprop descriptionlist,#BroadcastProp,[#comment:"Set BroadcastProps property Of Vector Member To :",#format:#boolean,#default:True]
addprop descriptionlist,#CenterregProp,[#comment:"Set centerRegPoint property Of Vector Member To :",#format:#boolean,#default:True]
addprop descriptionlist,#ClosedProp,[#comment:"Set Closed property Of Vector Member To :",#format:#boolean,#default:True]
addprop descriptionlist,#DirecttostageProp,[#comment:"Set DirectToStage property Of Vector Member To :",#format:#boolean,#default:True]
addprop descriptionlist,#ImageenabledProp,[#comment:"Set ImageEnabled property Of Vector Member To :",#format:#boolean,#default:True]
if the currentspritenum <> 0 then
addprop descriptionlist, #WhereTo, [#comment:"Where To Assign this Script ?", #format:#String,#range:spriteassignlist,#default:spriteassignlist[1]]
else
addprop descriptionlist, #WhereTo, [#comment:"Where To Assign this Script ?", #format:#String,#range:frameassignlist,#default:frameassignlist[2]]
end if
return descriptionlist
end getPropertyDescriptionList
--- Get Behavior Description List ---
-- Get Behavior description --
on getBehaviorDescription
return "This Behavior Sets all the True/False Properties of Vector Cast member " & RETURN & RETURN & \
"Parameters" & RETURN & \
"* Source Vector Cast member." & RETURN & \
"* True/False." & RETURN & \
"* Where to attach this Script"
end
-- Get Behavior description --
-- events --
on mouseUp me
if WhereTo="Mouse Up" then
SetTrueFalse
end if
end
on mouseDown me
if WhereTo="Mouse Down" then
SetTrueFalse
end if
end
on mouseEnter me
if WhereTo="Mouse Enter" then
SetTrueFalse
end if
end
on mouseLeave me
if WhereTo="Mouse Leave" then
SetTrueFalse
end if
end
on enterframe
if WhereTo="Enter Frame" then
SetTrueFalse
end if
end
on ExitFrame
if WhereTo="Exit Frame" then
SetTrueFalse
end if
end
on mousewithin
if WhereTo="Mouse Within" then
SetTrueFalse
end if
end
-- events --
-- custom handlers --
on SetTrueFalse
if member(sourcemember).type = #vectorShape then
member(sourcemember).antiAlias = AntialiasProp
member(sourcemember).broadcastProps = BroadcastProp
member(sourcemember).centerRegPoint = CenterregProp
member(sourcemember).closed = ClosedProp
member(sourcemember).directToStage = DirecttostageProp
member(sourcemember).imageEnabled = ImageenabledProp
end if
end
-- custom handlers --
------ Availbale for both Frame & Sprite Script ------
on isOKToAttach (me, aSpriteType, aSpriteNum)
case aSpriteType of
#graphic:
return true
#script:
return True
end case
end isOKToAttach
------ Availbale for both Frame & Sprite Script ------
------ Search for Vector Member ------
on searchVectorMember me
VectorMembersList = []
maxCastLib = the number of castLibs
repeat with theCastLib = 1 to maxCastLib
maxMember = the number of members of castLib theCastLib
repeat with memberNumber = 1 to maxMember
theMember = member(memberNumber, theCastLib)
if theMember.type = #vectorShape then
if theMember.name = EMPTY then
VectorMembersList.append(theMember)
else
VectorMembersList.append(theMember.name)
end if
end if
end repeat
end repeat
return VectorMembersList
end
------ Search for Vector Member ------
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA