Re: [Flashcoders] object Arrays

2007-07-26 Thread Ron Wheeler
Show the whole class definition. The compiler is pretty definite but you 
have not shown the part that it is complaining about. You are only show 
the part where it realizes that a complaint is in order. The error is 
higher up in the code.


Ron


David Ngo wrote:

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


  

___
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


Re: [Flashcoders] object Arrays

2007-07-26 Thread Paul Andrews
It's not really good paractice to name classes with Obj in the title, but 
anyway:


class lizPieceObj {

   public var levelup:MovieClip;
   public varlizPieceMC:MovieClip;
   public varmasker:MovieClip;
   public varlevelMasker:MovieClip;

   public 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;
}
}

I haven't checked it. You mention a class variable in your description, I'm 
not sure if you really mean a property (instance variable) or a class 
property (static variable), or if your constructor is intentionally private.


Paul

- Original Message - 
From: ilteris kaplan [EMAIL PROTECTED]

To: Flash Lists flashcoders@chattyfig.figleaf.com
Sent: Thursday, July 26, 2007 8:18 PM
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


RE: [Flashcoders] object Arrays

2007-07-26 Thread David Ngo
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