Hi Omar,
i think the best thing todo is to pick up a book, or even two (or websites
for that matter):
one about general object oriented concepts and one about general programming
concepts.

Your questions in particular deal with the concepts of local vs instance vs
global vs method parameters and information hiding.
Google for them and do some reading, thats the easiest way to understand the
differences.

greetz
JC

On 2/15/07, Omar Fouad <[EMAIL PROTECTED]> wrote:

Hi list i am new to AS2 and in writing classes and there is a question
that
i would like to do:

assume i have the following class

Class myClass {

var myName:String;
var myAge:Number:
var myJob:String;

      function setName(name) {
            name = myName;
      }
}
here i declared the myName variable at the beginning

in this class than:

Class myClass {

      function setName(myName:String) {

            trace("myName");
      }
}
and in this other class:

Class myClass {

      function setName(name) {
            var myName:String;
            name = myName;
      }
}
now the question is (even if it maight seen silly but i don't get the
concept yet), what is the difference between declaring the variables
before
methods (after the class declaration) and declaring them inside the method
itself, or even in the method parameters???

Thanks in advance



--
Omar Fouad - Digital Emotions...

Love is always patient and kind. It is never jealous. Love is never
boastful
nor conceited It is never rude or selfish. It does not take offense and is
not resentful. Love takes no pleasure in other people's sins...but
delights
in the truth. It is always ready to excuse, to trust, to hope... and to
endure... whatever comes.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
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

_______________________________________________
Flashcoders@chattyfig.figleaf.com
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

Reply via email to