Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Forward and Reverse (Shitf+Tab) between Fields
Director 8 and Lingo Bible
Wait for DirectMediaXtra Sprite to finish Playing
CD Door Close, Open - MCI
Inspect
goMU LDM
Media Make & Go
SkyDir
Shockwave Remote Faq
Get the computer name of user
MediaMacros Xtras Mall
 

 

 

Behavior Limited Text Behavior

Added on 9/8/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: KurtKoenig (website)

Drop this behavior on a field to make it editable. This behavior counts the number of words, entered in the editable field, and displays an alertmessage if the number of words, specified by the author is exeeded. enter the number of allowed words and your custom alertmessage in the parameterdialogbox, in it, you can also change some fontproperties .

Download PC Source    Download Mac Source
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--
--  Drop this behavior on a field to make it editable.
--  This behavior counts the number of words, entered in the editable field,
--  and displays an alertmessage if the number of words, specified by the
--  author is exeeded. enter the number of allowed words and your custom
--  alertmessage in the parameterdialogbox, in it, you can also change some
--  fontproperties .
--
--      Kurt Koenig * Belgium.                 --        Director 7        --
--                                             --        Director 8        --
--
--  
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
property pLimitedField, pTSMember, pWordCount,¬
pAlert, pTheFontSize, pTheFontStyle



on getPropertyDescriptionList me
  
  desclist = [:]
  addprop desclist, #pWordCount,[#comment: "How many words¬
are allowed in this field ?",#format: #integer, #default:"10"]
  addprop desclist, #pAlert,[#comment: "Enter an alertmessage¬
to display if exeeded ",#format: #string, #default:"Explain¬
it in 10 words or less please !"]
  addprop desclist, #pTheFontSize,[#comment: "Fontsize to use :",¬
#default:12,#format:#integer,#range:[#min:9,#max:96]]
  addprop desclist, #pTheFontStyle,[#comment: "Fontstyle to use :",¬
#format: #symbol, #range : [ #plain, #bold, #italic], #default: #plain ]
  
  return desclist
end getPropertyDescriptionList

on getbehaviordescription
  return¬
"This behavior determines how many words"&return&"¬
an editable field allows, and displays an"&return&"¬
alert if the number of words, specified"&return&"¬
by the author is exeeded..."&return&return&"¬
   Kurt * Belgium"
end getbehaviordescription

on getBehaviorTooltip me
  return "¬
"This behavior determines how many words"&return&"¬
an editable field allows, and displays an"&return&"¬
alert if the number of words, specified"&return&"¬
by the author is exeeded..."
end getBehaviorTooltip

on beginsprite me
  pLimitedField = sprite (me.spritenum)
  pTSMember = pLimitedField.member
  pTSMember . editable = true
  pTSMember . autoTab = TRUE
  pTSMember. fontsize = pTheFontSize
  pTSMember . fontstyle = pTheFontStyle.string
  
end beginsprite


on exitframe me
  if pTSMember. words . count <= pWordCount then
    nothing
  else
    if  pTSMember. words . count > pWordCount then
      delete pTSMember. word[(pwordcount + 1)]
      Alert pAlert
    end if
  end if
end exitframe

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail