Hello,
I'm trying to have a bunch of dynamically updating Labels (think internationalization) all show a Fade effect when their "text" binding source is updated. Since there is no default "change" event for the control, I've tried going down the path of wrapping the Label and implementing some of the code in my new control. Doesn't work. The code below does not fade the
label when the button is clicked.
Is it maybe possible to attach a default Fade Effect to my control's "show" Event via Action Script, and just toggle its visibility?
La code:
**************** MXML ***************
<com:FancyLabel xmlns:com="com.*" text="{tempString}" id="lblFancyText" />
<mx:Button label="Change Text"
click="tempString == 'bloo'? tempString='blah' : tempString='bloo';" />
<mx:Button label="Change Text"
click="tempString == 'bloo'? tempString='blah' : tempString='bloo';" />
**************** Extended Label ***************
import mx.effects.*;
import mx.controls.*;
import mx.controls.*;
class com.FancyLabel extends mx.controls.Label {
// Constructor
public function FancyLabel() {
}
public function showLabel():Void {
var textFade:Fade = new Fade(this);
textFade.duration = 2000;
textFade.alphaFrom = 0;
textFade.alphaTo = 100;
textFade.playEffect();
}
public function set text(val:String):Void {
super.text = val;
show
Label();
}
}
***************************************
Thanks in advance,- Ben Lucyk
--
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.

