Just drag onto text fields (that have a unique name) and it will automatically store and retrieve the data for that field using setPref and getPref.
---------------------------------------------
--this behavior will load a field from a pref file based on it"s name,
--and save it"s data on end sprite to the same pref file.
--The Default is currently set to " " (a space)
--by Timm Ryan
property mysprite, themember, myPrefName, myDefault
on beginsprite me
mySprite = sprite(me.spriteNum)
theMember = mySprite.member
myPrefName = themember & ".txt"
myData = getPref(myPrefName)
if voidP(myData) then
myData = myDefault
end if
theMember.text = myData
end
on endsprite me
mytext = theMember.text
setPref(myPrefName, myText)
end
on getPropertyDescriptionList
return [ #myDefault: [#comment: "Default Text", #format: #string, #default: " " ]]
end getPropertyDescriptionList
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA