Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: Flash 4 Variables - weeeee |
From: | John Dowdell |
Date: | Tue, 29 Jun 1999 23:36:29 +0100 |
At 12:50 PM 6/29/99, Gilbert Irias wrote:
>Right now I have an MC where I keep all my variables and make calls to them.
>Is this the only way to have global variables? Anyway to track them aside
>from setting up temp text fields to write to? Also, does this MC have to
>have an instance on the stage to get called (I'm guessing you do for the
>/MCName:Frame call.) And is the root still referred to as _level0?
One of the big issues we'll see on the list over the coming months is the
scoping of variables. (My apologies in advance because I'm not yet
practiced at this story... clearer ways of phrasing greatly appreciated,
tia.)
Variables are private to a movie clip. Different clips can use the same
names for their variables, and they'll each have unique values. Variables
are scoped to clips.
There aren't global variables per se. You can achieve the same effect,
though, by reaching inside a named clip and accessing its private
variables. You can access another movie clip by navigating the object
hierarchy in the file, same as when sending messages to targets. If you'll
be keeping a repository of "global" variables like this then it's likely
easiest to have the clip right on the main timeline, across all frames.
You can store data in fields, as you described above, but you can also
dynamically create variables within a movie clip too. This might be the
easiest way to create counters and other changing elements which need to be
accessible by many clips.
(If you're instead considering text fields in order to track variable value
during execution, then the "trace" function can help achieve this goal.)
Is this along the lines of what you were looking for? Can any of the folks
who were on the beta list refine the above explanation? Thanks in advance
for any word.
jd
John Dowdell, Macromedia Tech Support, San Francisco CA US
Search technotes: http://www.macromedia.com/support/search/
Offlist email risks capture by the spam filters. I may not see your
email if it's not on the list. Private one-on-one email options are
available via Priority Access: http://www.macromedia.com/support/
------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-managershocker [dot] com. Problems to: ownershocker [dot] com
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-managershocker [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]