Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | Re: FLASH: variables in elements other than text boxes? |
| From: | Nigel Randsley-Pena |
| Date: | Tue, 7 Sep 1999 01:43:48 +0100 |
Todd,
In general terms the answer to your question is no. But it can also be
yes as long as one is creative.
First to clear what might be a misconception on your part. You do not
need a text box to load variables from a text file. When you palce an
action on a particular timeline that loads variables from a text file
they will exist from that point on in the timeline to wich they have
been loaded. What happens is that if you want the user to 'see' the
value of a particular variable then you will have to set the contents of
a textfield to the value of that variable. When you load variables from
a text file if you have a textfield that has the same name as one of the
variables that you loaded and it's on the same timeline as the variables
get loaded onto then the textfields value will be automaticly be updated
to reflect the value of the loaded variable. Whew ! This last part can
lead to confusion but it's important to understand correctly.
Having established the base grounds lets proceed to the creative part.
Suppose you want to have a personalised weather report done in Flash
that covers some cities in your area. By the way this is a good example
of something that would be very good for Generator. Let's say you're
giving information on Lower Hicks and Upper Hicks, the dynamic data for
each is contained in 2 different text files, something like this :
lh.txt contains temp=25�C&sky=overcast&wind=breeze...etc. , uh.txt would
contain the same set of variables but with proper corresponding values.
In your Flash movie you have one generic symbol that is able to display
weather conditions for any of the cities you serve. This would be a sort
of template that would get filled with the data from your text files.
The text would look something like this :
Outlook for Lower Hicks : {sky} skies and a high of {temp} with a {wind}
are predicted today.
The curly brackets represent placeholders for textfields named sky, temp
and wind, reflecting the variables contained in the textfile. Don't
confuse with Generator variable placment, I just used the same symbol to
represent them. Now if you're using Garamond for example for the text
then use it also for the textfields and set the textfield option to
include outlines for the font. The basic problem here is getting proper
word spacing. As explained you can't because you would have to know
before hand the size of each word you where going to place. You can
accept this limitation and leave it as is or be a bit more creative and
create the whole sentence on the fly.
This can be done using only one textfield and setting it's value to a
concatenation, like this :
:sky & " skies and a high of " & :temp & " with a " & :wind " are
predicted today."
This will give you a properly spaced sentence dynamicly created from the
data contained in the text files.
Hope this ranting helps you get started in the right direction.
Nigel
------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manager
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manager
Replies
FLASH: variables in elements other than , todd stabley
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

