here is the complete code.  As you can see i just expose the textfield 
on the custon button and capture the field to apply the effect, "by hand".
  i am pretty sure that there is better aproaches but this is just mine 
opinion and works.  (i dont have any ReferenceError like the original 
post say)

  []'s,

       Luís Eduardo.


Button.mxml  ----------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Button xmlns:mx="http://www.adobe.com/2006/mxml";>
    <mx:Script>
        <![CDATA[
            import mx.core.UITextField;
           
            public function getTextField():UITextField {
                return this.textField;
            }
        ]]>
    </mx:Script>
</mx:Button>

MainFile.mxml -------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml";
width="100%" height="100%"
backgroundGradientColors="[#c0c0c0, #c0c0c0]"
xmlns:supra="br.com.suprasis.Components.*">

<mx:Glow id="glowImage" duration="1000"
alphaFrom="1.0" alphaTo="0.3"
blurXFrom="0.0" blurXTo="50.0"
blurYFrom="0.0" blurYTo="50.0"
color="0xFF0000"/>

<supra:Button id="btn" label="a button" width="200" height="200"
rollOver="showMyGlow()"/>

<mx:Script>
<![CDATA[
public function showMyGlow(): void {
glowImage.play([btn.getTextField()]);
}
]]>
</mx:Script>

</mx:Application>

here is a link that have a swf but i dont know how much it will be online:
www.suprasis.com.br/temp/glowTemp.html






Roman Protsiuk escreveu:

> I can't see difference between the examples and problem still open.
> You cant just play effect on an instance that has no startEffect() method.
>
> R.
>


                
_______________________________________________________ 
Yahoo! Mail - Sempre a melhor op��o para voc�! 
Experimente j� e veja as novidades. 
http://br.yahoo.com/mailbeta/tudonovo/
 

Reply via email to