Flasher Archive

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


Subject: RE: FLASH: Calculating string lengths of variables
From: Paul Willoughby
Date: Tue, 11 Jul 2000 14:23:22 +0100

Thanks Helen, it was a hard return. Stupid thing is I thought I'd checked
that, but I had accidentally opened the text file in MS Word which probably
didn't help.
Paul

-----Original Message-----
From: Helen Triolo [designerati-technica [dot] com (mailto:designerati-technica [dot] com)]
Sent: 11 July 2000 12:57
To: flasheratchinwag [dot] com
Subject: Re: FLASH: Calculating string lengths of variables


Paul Willoughby wrote:
>
> Hi, I've subscribed to Flasher-l to get answers to questions I couldn't
find
> elsewhere. I'm trying to use the 'Length' operator to get the length of a
> variable and set it as a new variable. I use this code: 'Set
> Variable:"/:Length" = Length (/:A2A)', where /:A2A is a variable I've
loaded
> from a text file. Now, I know the word I loaded has only four letters, but
> Flash keeps returning the /:Length variable as 6. So I changed the loaded
> variable /:A2A to a 7 letter word, and Flash returns 9. Where's it getting
> these extra 2 characters from? I can get round the problem by just
> subtracting 2, but I'd like to know if anyone else has experienced this.
Is
> it a bug or what?
>
Paul,

Maybe you have a hard return at the end of the file? That would append
chr(13) and chr(10) -- carriage return and linefeed -- to the string
you're reading in. You could use a substring function to get rid of
those "characters." One quirk of Flash is that if you read in text with
hard returns in it and display it in a textfield, Flash outputs a new
line for *both* the carriage return and the linefeed characters, so you
end up with double spacing when you don't want it. For a routine to get
around that, search on "double returns" at
http://i-technica.com/flashlist.

hth,
Helen
---------------------------------------------------
helen triolo � http://i-technica.com � 301-424-6037

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com



flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


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