Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
All_In_One Button Hue Shift
Elapsed Time
Vector Shape - Create Grid
DM Transitions Pack 2
Blur Rollover-Alphamania
Director Web
Jeff's Platform Game Engine v2
cXtraStringGrid
Date Time Xtra
Set ImageEnabled Property of a Flash Sprite
MediaMacros Xtras Mall
 

 

 

Behavior List Maker

Added on 1/28/2000

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: MarkDaggett

This code will take items from a text field and then convert every item to an entry in the list.

--list maker --
--Mark Daggett 1999
-- mark@flavoredthunder.com
-- http://www.flavoredthunder.com
--this behavior was created because often times with director you need to create lists that are
--either to large or change to much to hard code them into the behavior themselves.
--This property will take all the contents of a field and add them to a list. It will also use what ever item delimiter that you choose.
-- Right now the only output function is the getInfo handler which returns a random value from the list to the outPut field.

property pField --this is the field to pull info from
property pTemp -- this is a temp field
property pOutField -- this is the outPut Field
property pList
property pDelimiter -- this is the property for the delimiter
on beginSprite me
  set the itemDelimiter = pDelimiter
  set pTemp = ""
  set pList = list()
  set pTemp = the text of field pField
  repeat with newItems = the number of items of pTemp down to 1
    
    addAt pList, count(pList)+1 ,item newItems of pTemp
  end repeat
  
end

on getInfo me
  put getAt(pList, random(count(pList))) into field pOutField
end
on getPropertyDescriptionList me
  set pdlist to [:]
  addprop pdlist, #pField, [#comment:"Field where content is stored", #format:#field, #Default:""]
  addprop pdlist, #pOutField, [#comment:"Field to out put contents", #format:#field, #Default:""]
  addprop pdlist, #pDelimiter, [#comment:"What is your item delimiter", #format:#string, #Default:"|"]
  return pdlist
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