Flasher Archive

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


Subject: Re: FLASH: Flash 4 Variables - weeeee
From: Colin Moock
Date: Wed, 30 Jun 1999 05:01:25 +0100

flasheratshocker [dot] com,Internet writes:
>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?
it's the only way to approximate them. as jd said, there are no real globals
in flash. there really aren't any locals either in the normal sense of a
variable that's only defined for the duration of a function.

> Anyway to track them aside
>from setting up temp text fields to write to?
several methods:
1) use control>>list variables at any time during test movie mode
2) use control>>list objects also during test movie mode
3) use the trace action. trace will send the results of an expression or
string to the output window during playback in test movie mode. in a movie if
you want to know that frame 5 had been reached, you could put a trace action
on that frame with a string literal value of "hi there". then "hi there"
would be displayed in the output window in test movie mode when frame 5 was
hit. apply trace as necesarry to output the value of a variable or message.
note though that it must be set to expression (the two lines under the abc
button) if you want to send the interpreted value of a variable. to send both
a message and a variable, set to expression, then use something like this:
trace("number of objects is currently: " &numObj)

> 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.)
yup. it also has to be named.

> And is the root still referred to as _level0?
yup again. note that a variable stored on the main timeline called "foo"
would be referred to like this:

/:foo

a bit odd, but logical.

cheers,
colin

--
-

------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [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-manageratshocker [dot] com


Replies
  FLASH: Flash 4 Variables - weeeee, Gilbert Irias

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