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
QTGrabSprite
Vector Shape - Create Grid
Checking an open database - Valentina
simBroPro
Sound 2 CuePoint
CatFade
DirectEmail
QTRecordAudioXtra
Import text as cast members
Screen Savers
 

 

 

Behavior Add/Remove Line Feeds

Added on 2/15/2000

 

Compatibilities:
D6_5 D7 D8 Mac PC Script

Rating:

Author: Macromedia (website)

From Technote #3151 at Macromedia.com

--remove line feeds
on CRLF2CR source
    set dest to ""
    repeat while true
      set theOffset to offset(numToChar(10), source)
      if NOT theOffset then exit repeat
      put char 1 to (theOffset - 1) of source after dest
      delete char 1 to theOffset of source
    end repeat
    put source after dest
    return dest
end CRLF2CR

--add line feeds
on CR2CRLF source
    set dest to ""
    repeat while true
      set theOffset to offset(numToChar(13), source)
      if NOT theOffset then exit repeat
      put char 1 to theOffset of source after dest
      put numToChar(10) after dest
      delete char 1 to theOffset of source
    end repeat
    put source after dest
    return dest
end CR2CRLF

 


Contact

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

Send e-mail