|
From: | jean-michel.voicechat_fan |
Subject: | Re: [Swftools-common] an ActionScript question |
Date: | Wed, 25 Nov 2009 10:28:01 +0100 |
User-agent: | Thunderbird 2.0.0.23 (X11/20090812) |
thank you ricardo again a victory your solution works and you have completely understood you can check in the same file thanks to matthew and E .blokos for E.blokos it is possible to add two package also in fact i have tried another thing that does not work i want to have a common trace function i have put the lines outside the class the compilation is ok but the trace function does not show anything see the old link Ricardo Pedroso a écrit :
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 classI 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
jeanmichel_gens.vcf
Description: Vcard
[Prev in Thread] | Current Thread | [Next in Thread] |