Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Clipboard Xtra
Convert Decimal to Comma (EU)
Replace embedded fonts in text/field and button members
Rolling a Ball.
The Multimedia Workshop
Count Down Timer
Send to Top
Director 7 Demystified
Fraction Scripts
Media Make & Go
 

 

 

Behavior Clear all editable fields

Added on 6/12/2006

 

Compatibilities:
D6_5 D7 D8 D8_5 D9 Mac PC Script Shockwave

This item has not yet been rated

Author: MikeBlaustein

Have you ever had a project where there are editable fields that should always start off blank, but Director keeps saving the info you filled in last time you tested the file in Authoring mode? Well, this should be a problem no more. Note that this will clear ALL editable fields, so if there are some that need to have a default value, you should include that in the sprite's beginSprite handler. I usually will put this into the startMovie handler so everything always starts off fresh.

on clearEditableFields
  repeat with iCast=1 to the number of castlibs
    repeat with iMember=1 to castlib(iCast).member.count
      if castlib(iCast).member[iMember].type=#text then
        if castlib(iCast).member[iMember].editable=1 then
          castlib(iCast).member[iMember].text=""
        end if
      end if
    end repeat
  end repeat
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail