Image, like all UIComponents, has a zero argument constructor. Unless your imageWithData knows what its username is going to be without any outside info, it wouldn't make sense to do much of anything with the username in the constructor. If you're going to be instantiating your images in Actionscript you can just assign the username after the object is created.
--- In flexcoders@yahoogroups.com, "luvfotography" <[EMAIL PROTECTED]> wrote: > > Hi, I'm trying to create a class that extends the image class, > I need to associate a username with the image, > Here is what I have: > > package > { > import mx.controls.Image; > > public class imageWithData extends Image { > private var _username:String; > > public function imageWithData() { > super(); > // _username = ??? > } > public function set username(value:String):void { > _username = value; > } > public function get username():String { > return _username; > } > } > } > > I am unclear as to what goes after the 'super()' > do I need a _username = something? > > thanks, >