Hi Duccio,
 
Have a look at the commitProperties method which is called by the Flex component framework - override that method, and make sure you call super.commitProperties().
 
Cheers,
 
Ali
 
--
Alistair McLeod
Development Director
iteration::two
[EMAIL PROTECTED]
 
Office:  +44 (0)131 338 6108
 
This e-mail and any associated attachments transmitted with it may contain confidential information and must not be copied, or disclosed, or used by anyone other than the intended recipient(s). If you are not the intended recipient(s) please destroy this e-mail, and any copies of it, immediately.
 
Please also note that while software systems have been used to try to ensure that this e-mail has been swept for viruses, iteration::two do not accept responsibility for any damage or loss caused in respect of any viruses transmitted by the e-mail. Please ensure your own checks are carried out before any attachments are opened.
 
 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Duccio
Sent: 05 May 2005 09:26
To: flexcoders@yahoogroups.com
Subject: [flexcoders] constructor properties

I have a custom component that extends from mx.controls.Image. I'd like to set some properties before the class executes its init() method. Can i use my class constructor to pass some values to my class?
I tried this but i just can't pass values to constructor (undefined):

import mx.controls.Image;
class MyImage extends Image
{
private var myWidth:Number;
private var myHeight:Number;
 public function MyImage(myWidth:Number, myHeight:Number)
 {
  myWidth=myWidth;
  myHeight=myHeight;
  _alpha=80;
  
 }
} 
 
Thanks for your help
Duccio Del Ministro


Yahoo! Groups Links

Reply via email to