Title: Re: [flexcoders] Why does this effect not work?
mx.controls.Label is a glorified wrapper for TextField.  TextField is the basic, intrinsic GUI object for a TextField in Flash.  Label ensures it's only 1 line, doesn't word-wrap, and has a nice API compared to the TextField.  It does a lot of other things, but the key point here is that it wraps TextField.
 
TextField supports some MovieClip methods & properties, namely _x, _y, _width, _height, and most importantly _alpha.  Alpha, however, works in 2 ways on TextFields.  It's either 0 (which is almost the same as _visible = false) or 100, which is about the same as _visible = true.  The only time TextFields respect an _alpha value of 1 through 99 is when the fonts are embedded.
 
 
mx.effects.Fade does just that; it tweens the alpha value on MovieClips and TextFields.  Therefore, while Fade is technically supported and compiles, it will not fade device text; device text, at least the way it's implemented in Flash, cannot "fade".  Perhaps the compiler should issue a warning about this.
 
Dissolve, however, adds a vector cover of sorts, which IS fadeable, and fades that in.  Therefore, you get the illusion of the text fading out.  Smoke and mirrors.
 
Hope that makes sense.
 
 
 
----- Original Message -----
Sent: Saturday, December 10, 2005 4:16 AM
Subject: Re: [flexcoders] Why does this effect not work?

As to your guess with Device Fonts and effects, the thing is that using an


<mx:Fade .../>

on a Label's show/hideEffect attribute does work. So it must be anything with the code...

I really want to got this solved because I wanna make use of programmatic effects quite frequently.

Best regards
RR
--
mobile: +49-(0)170-914-5495
email:   [EMAIL PROTECTED]




-----Original Message-----
From: flexcoders@yahoogroups.com <flexcoders@yahoogroups.com>
To: flexcoders@yahoogroups.com <flexcoders@yahoogroups.com>
Sent: Sat Dec 10 02:39:17 2005
Subject: Re: [flexcoders] Why does this effect not work?

My guess is that that particluar effect doesn't work because you cannot fade device text.  Text in Flex is by default, device, meaning it uses device fonts, or native OS machine fonts.  If you were to embed the fonts for that Label, I be it'd work.

Therefore, use a Dissovle instead for text specific fades... or embed the fonts.

More context:
http://www.jessewarden.com/archives/2005/10/mxeffectsfade_v.html

----- Original Message -----
From: Ralf Rottmann <mailto:[EMAIL PROTECTED]
To: Flexcoders@yahoogroups.com
Sent: Friday, December 09, 2005 8:29 PM
Subject: [flexcoders] Why does this effect not work?


Hi there,

Following up on the recent posting related to Flex effects, can anybody comment on why the following very simple code excerpt does not work? All I want to do is on click of the button fade the label from 0 to 1.

private function FadeIn():Void {
  var fx:Fade = new Fade(this.lbl);
  fx.fromAlpha = 0;
  fx.toAlpha = 1.0;
  fx.duration = 2000;
  fx.playEffect();
}

<mx:Label id="lbl" text="some text" />
<mx:Button label="Start Effect" click="FadeIn()"/>

What it should do:
Render the label.
Render the button.
Wait.
User clicks.
Label hides (alpha = 0).
Label slowly fades alpha to 1.

However: No fade at all happens.

Why?
Isn't this exactly how effects are supposed to work conceptually?

(Talking about Flex 2 Alpha 1 here.)

Best regards
RR
--
mobile: +49-(0)170-914-5495
email:   [EMAIL PROTECTED]






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ>         Computer software development <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw>     Software design and development <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+devel! opment+best+practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>        
Macromedia flex <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZI36cYzBjw>         Software development best practice <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>  

________________________________

YAHOO! GROUPS LINKS


        *        Visit your group "flexcoders <http://groups.yahoo.com/group/flexcoders> " on the web.
         
*        To unsubscribe from this group, send an email to:
         [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
         
*        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .


________________________________



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to