Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Manipulating Text File
From: Helen Triolo
Date: Tue, 2 May 2000 17:12:24 +0100

Tobie Kerridge wrote:
>
> Hi, I'm importing a text file into a movie clip text field using "load
> variables". I want to then chop up the result using its
> delimiters/paragraphs and assign the various chunks as variables. Has anyone
> got an idea how this can be done? I'm hoping to set about 25 values and want
> to avoid calling 25 individual external files
>

The other day, Branden posted the following code, which parses an input
string looking for instances of linefeeds, and rebuilds the string,
leaving the linefeeds out. If your text field has data separated by a
blank line, you could do the same kind of parsing (looking for strings
of 10-13-10-13 to delimit the paragraph), and set the value of a new
variable (Set Variable "newvar"&i = currentstring) every time one is
found. Branden's code (which needs a count initializer at the start
too):

Set Variable: "loadedVar" = 1
Loop While (count <=length(loadedVar))
If (ord(substring(loadedVar, count,1)) <> 13)
Set Variable: "finalVar" = finalVar&substring(loadedVar,
count,1)
End If
Set Variable: "count" = count+1
End Loop

----------------------------------------
helen triolo � http://i-technica.com
designerati-technica [dot] com � 301-424-6037
----------------------------------------

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml

Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: Manipulating Text File, Tobie Kerridge

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]