Posted on 2003-11-26
Im relatively new to flash an was wondering how this works exactly.
suppose I have a class.....
function Product (id:Number, prodName:Name, price:Number)
this.id = id;
this.prodName = prodName;
this.price = price;
Suppose I have another class where I need to reference this.price?
how do I go about this? Can I just go ahead and make this.price global so I can use it in any of my classes? Or do I have to go like this???
var cliplessPedal:Product=new Product(1, "Clipless Pedal", 11);
myNewVar = cliplessPedal.price