Are you declaring your properties public or have public getters to access
them within your class?



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of ilteris
kaplan
Sent: Thursday, July 26, 2007 3:18 PM
To: Flash Lists
Subject: [Flashcoders] object Arrays

Hello All,

Basically I am trying to create a object which I can pass to my array  
and then access some properties of this object. Only problem is, I am  
trying to achieve this in a class.

Basically I declared my array as a class variable and then  
instantiated it in my constructor function in the class. I do have  
this function which is supposedly to create an object with certain  
properties.




private function lizPieceObj(levelup:MovieClip, lizPieceMc:MovieClip,  
masker:MovieClip, levelMasker:MovieClip) {
// build an obj to mimick 2d array.
                        
                        this.levelup = levelup;
                        this.lizPieceMC = lizPieceMC;
                        this.masker = masker;
                        this.levelMasker = levelMasker;
                }


Here is, in another function, I am trying to create this object.
        piecesArray[index] = new lizPieceObj(levelup, lizPieceMc, masker,  
levelMasker);
                
in order to access them later like
piecesArray[index].levelup, piecesArray[index].masker etc.

But upon compilingthe code, I do get this error. There is no property  
with the name levelup. There is no property with the name lizPiece,  
There is no property with the name masker.... etc.

you get the idea.
I am assuming this is something to do with scope. I am yet not sure  
how to deal with it though.
Thanks a lot.



_______________________________________________
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