On 2/1/07, Paul V. <[EMAIL PROTECTED]> wrote:
Hi, I am not an expert, but from what I have read. Private variables, don't
need to be declared, so if you don't need them outside the function, or
event I think you can keep things neat by not declaring them at all until
you assign them.
Not true, unless you are using AS1 or your class is dynamic (which is
not the default and generally not a great idea). Private variables
must be declared in AS2 and AS3. Variables that are internal to a
function must also be declared, but can be declared anywhere in the
function (e.g., at initial assignment).
And non-static variables, (dynamic variables) I would assign to an
instance. VarInstanceName = eval("varNameDynamicInstance"+i)l for exapmle
if you are using calling them via a for loop. (for i= value ; i condition
;i++){code;} .
eval() is deprecated. Better to use this["varNameDynamicInstance" +
i]. Even better to keep an array of instances and loop through that.
--
T. Michael Keesey
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com