Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Fade till done
123 Flash Menu
Blur Rollover-Alphamania
Graphing a Function
Popup Text List Menu
Progress Bar lingo Script
Wait for a DirectMedia CuePoint (Index ID as Reference)
fading button on 1 sprite
DM Transition Pack 1
Asteroids Game
MediaMacros Xtras Mall
 

 

 

Behavior Auto Save and Load Text

Added on 9/29/1999

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: TimmRyan

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

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail