Title: Re: [flexcoders] Why does this effect not work?
AND, here's an example that gets fade to work by embedding the font:
 

<?xml version="1.0" encoding="utf-8"?>

<mx:Application

xmlns:mx="http://www.macromedia.com/2005/mxml"

xmlns="*"

creationComplete="initApp()">

<mx:Script>

<![CDATA[

[Embed(systemFont='Arial', mimeType='application/x-font-truetype')]

var arialFont:Class;

import mx.effects.Dissolve;

import mx.effects.Fade;

private var diss:Dissolve;

private var fade:Fade;

private function initApp():Void

{

diss = new Dissolve(lbl);

diss.color = 0xFFFFFF;

diss.suspendBackgroundProcessing = true;

diss.alphaFrom = 0;

diss.alphaTo = 100;

diss.duration = 10 * 1000;

fade = new Fade(lblEmbeded);

fade.suspendBackgroundProcessing = true;

fade.alphaFrom = 0;

fade.alphaTo = 100;

fade.duration = 10 * 1000;

}

private function dissolveIn():Void

{

diss.playEffect();

}

private function fadeIn():Void

{

fade.playEffect();

}

]]>

</mx:Script>

<mx:HBox width="100%" height="100%" backgroundColor="#FFFFFF">

<mx:VBox width="100%" height="100%">

<mx:Label id="lbl" text="some text" />

<mx:Button label="Start Effect" click="dissolveIn()"/>

</mx:VBox>

<mx:VBox width="100%" height="100%">

<mx:Label id="lblEmbeded" text="some text" fontFamily="Arial" />

<mx:Button label="Start Effect" click="fadeIn()"/>

</mx:VBox>

</mx:HBox>

</mx:Application>



--
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




Reply via email to