Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Wait for MPEG with MCI commands
Expire date
Wait For Frame Ready
Slider-Alphamania
LipSync
List Inspector 1.1 with Tree View
Royalty free Music and Loops
Radians to degrees, degrees to radians
cXtraTransitions2
Reset Cursor of all sprites to Default
MediaMacros Xtras Mall
 

 

 

Behavior Sortem

Added on 5/23/2001

 

Compatibilities:
behavior D7 D8 D8_5 Mac PC Shockwave

This item has not yet been rated

Author: KurtKoenig (website)

SORT OUT -- Use repeatloops to sort the numbers (or letters) in a field. Kurt * Belgium 05/15/2001

Download PC Source
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
--   SORT OUT
--
--   Use repeatloops to sort the numbers (or letters)
--   in a field.
--  
--
--   Kurt * Belgium     05/15/2001
--
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------


on mouseup me
  -- the number of characters to sort
  AMOUNT = (member "Input").chars.count
  --The number of times the loop will be repeated = COUNTER
  COUNTER = 1
  -- The number of times compared to the number of characters
  repeat while COUNTER <= AMOUNT
    -- The position of an element
    POS = 1
    REMAIN = AMOUNT - COUNTER
    repeat while POS <= REMAIN
      --if an element is bigger than the next element, it is placed in a
      --helpvariable,then the position of the two elements is switched.
      if (member "Input").char[POS] > (member "Input").char[POS + 1] then
        HELP = (member "Input").char[POS]
        (member "Input").char[POS] = (member "Input").char[POS + 1]
        (member "Input").char[POS + 1] = HELP
      end if
      POS = POS + 1
    end repeat
    COUNTER = (COUNTER + 1)
  end repeat
end



 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail