David Benman wrote:
What's the best practice for declaring reused variables within a function in AS3? For example, if you use "count" several times in your function, if you declare it at the start of your function, "var count:Number;" it makes it harder to cut and paste your code for use elsewhere but you get errors if redeclare it (like you could in AS2) throughout your script.
It's better towards the start, though I often declare them inline in loops (slapped wrist, probably).

Since counts are whole numbers, it would really be better to use int or uint..

Paul


David Benman
Interactive Developer
d...@dbenman.com
http://www.dbenman.com
(508) 954-1202 (cell)
(315) 637-8487 (home office)



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to