Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: Flash 4 - Universal variable? |
From: | Laura Mollett |
Date: | Tue, 7 Mar 2000 03:30:14 GMT |
> Hi,
>
> I noticed that variables in Flash are only unique in the symbol instance
> they are defined in (ie instance1/variable1 is different from
> instance2/variable1). Now, is there a way to have a variable that is
> universal in the entire Flash movie. I want to do this so i can let a
> button set the value of a variable in order to store what a user has clicked.
>
> Thanks for the info,
Don't we wish :) No, there aren't universal variables, but you can access
them anyway. Store the variable set by the button on the main timeline so
that you can easily access it from any other movie clip. A / indicates the
main timeline and the : indicates that you're accessing a variable (as
opposed to targeting another mc). There's some information in the Flash help
files to help you understand how Flash deals with arrays (basically, it
cheats :). You could just have the main timeline be a "holder" for the data.
Then every time you push a button, the button tells target the main timeline
(tell target: /) to set variable: "buttonname" = i-clicked-the-red-one or
whatever you want. It's much easier to read the information out of the main
timeline (from another mc, you could access it by set variable: "x" =
/:i-clicked-the-red-one), but you have to be careful that you don't change
your variable by accident. You can do the same thing down into another mc,
but it gets tricky, because you have to give it more of a pathname
(/mc/:variablename) and sometimes you have evaluate the variable to actually
read it out.
hth,
Laura
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World�s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California
-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]