RE: [flexcoders] Flex2b2 : Icon Manipulation
Hi Harry, Unfortunately the icon cant take an instance, it can only take a class. Ive filed an enhancement request for skins to take something like a factory so that you could do this sort of thing. Im not hopeful for 2.0 though L You might need to provide the manipulated icon and embed it yourself. Matt From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Harald Dehn Sent: Saturday, April 08, 2006 12:39 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex2b2 : Icon Manipulation Hi, I try to manipulate the Icon of a subclass of a Linkbutton to generate a disabledIcon. Could anyone help me, to convert an Image to a Class to set as a disabled Image? Harry public class LinkButtonEx extends LinkButton { private var _DisabledImage:Image; public override function setStyle(styleProp:String, newValue:*):void { super.setStyle(styleProp, newValue); if ( styleProp == icon ) { if( _DisabledImage == null ) { _DisabledImage = new Image(); this.addChild(_DisabledImage); } _DisabledImage.source = newValue; this.callLater(_DisabledIconLoaded); } } private function _DisabledIconLoaded():void { _DisabledImage.content.blendMode = BlendMode.ERASE; // doing some Bit super.setStyle(disabledIcon, _DisabledImage); // I get an error here } public function LinkButtonEx() { super(); } } Harald Dehn Gutzkowstraße 27 60594 Frankfurt Tel +49 (69) 61002712 Fax +49 (69) 15049656 Mobil +69 (151) 17887510 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Flex2b2 : Icon Manipulation
Hi, I try to manipulate the Icon of a subclass of a Linkbutton to generate a disabledIcon. Could anyone help me, to convert an Image to a Class to set as a disabled Image? Harry public class LinkButtonEx extends LinkButton { private var _DisabledImage:Image; public override function setStyle(styleProp:String, newValue:*):void { super.setStyle(styleProp, newValue); if ( styleProp == icon ) { if( _DisabledImage == null ) { _DisabledImage = new Image(); this.addChild(_DisabledImage); } _DisabledImage.source = newValue; this.callLater(_DisabledIconLoaded); } } private function _DisabledIconLoaded():void { _DisabledImage.content.blendMode = BlendMode.ERASE; // doing some Bit super.setStyle(disabledIcon, _DisabledImage); // I get an error here } public function LinkButtonEx() { super(); } } Harald Dehn Gutzkowstraße 27 60594 Frankfurt Tel +49 (69) 61002712 Fax +49 (69) 15049656 Mobil +69 (151) 17887510 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. BEGIN:VCARD VERSION:2.1 N:Dehn;Harald FN:Harald Dehn ([EMAIL PROTECTED]) TEL;HOME;VOICE:+49 (69) 61002712 TEL;CELL;VOICE:+49 (151) 17887510 TEL;WORK;FAX:+49 (69) 15049656 ADR;WORK:;;Gutzkowstraße 27;Frankfurt;;60594;Deutschland LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Gutzkowstra=DFe 27=0D=0AFrankfurt 60594=0D=0ADeutschland ADR;HOME:;;Gutzkowstraße 27;Frankfurt;;60594;Deutschland LABEL;HOME;ENCODING=QUOTED-PRINTABLE:Gutzkowstra=DFe 27=0D=0AFrankfurt 60594=0D=0ADeutschland EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20060302T091719Z END:VCARD