[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] an ActionScript question
From: |
Ricardo Pedroso |
Subject: |
Re: [Swftools-common] an ActionScript question |
Date: |
Tue, 24 Nov 2009 22:19:03 +0000 |
On Tue, Nov 24, 2009 at 1:48 PM, jean-michel.voicechat_fan
<address@hidden> wrote:
> it must a stupid question but i don t know the answer
> in a module with two classes as shown in this link
> http://jeanmichel.gens.free.fr/swfc/twoclass.sc
> how to use a global variable defined in the main class ( or root ) from
> the second class
I think you can do this:
package {
import flash.display.*
import flash.text.TextField ;
import flash.geom.* ;
import flash.events.* ;
import Date ;
var glob:String ="I'm a global var";
now you can read/write to glob in your Main class and User class
but be aware that global vars, in generally, is not a good approach.
PS: I'm not sure if I fully understand your question.
Ricardo