Var and Private Var


hey there,

 

just quick question.

what more better practice use?

 

putting private var before constructor code in class, or placing variable corresponding function using it?

 

thanks

it depends upon you're trying do.

 

if have variable want use (and reuse) , want variable accessible across more 1 function, declare variable outside of functions. 

 

whether should private, internal, protected or public depends on whether variable needs accessible outside class and, if so, (relative class).



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support