Opps,
I missed your first sentence.
var fadeEffect:TweenEffect = getStyle("fadeEffect");
// you might have to cast it if it is not a Fade instance or do an is check.
But, getStyle() is what you want.
Peace, Mike
On 4/30/07, Michael Schmalle <[EMAIL PROTECTED]> wrote:
Hi,
Really all mxml are actionscript classes.
So in your extended component;
- create
private var tween:Fade;
In createChildren() or something like it;
tween = new Fade(this);
tween.alphaTo = getStyle("fadeAlphaTo");
tween.alphaFrom = getStyle("fadeAlphaFrom");
// any other defaults or initializations
Then in a handler or method, trigger it.
private function fadeTrigger():void
{
tween.play();
}
Remember, you can also add update and end handlers to the tween instance.
You could reset this instance, play it in reverse(). Just check out the
ASDoc's on Fade.
Peace, Mike
On 4/30/07, Claudia Barnal <[EMAIL PROTECTED]> wrote:
>
> When instantiating a component through mxml I can easily add an effect
> to the hideEffect parameter, but what if I always want that effect to
> occur in an extended component?
>
> What method would I have to extend?
> Or what event would I have to listen to?
>
> If using the fade effect, also what would be the best way to implement
> it?
>
> Thank you for any help,
> Claudia
>
>
--
Teoti Graphix
http://www.teotigraphix.com
Blog - Flex2Components
http://www.flex2components.com
You can find more by solving the problem then by 'asking the question'.
--
Teoti Graphix
http://www.teotigraphix.com
Blog - Flex2Components
http://www.flex2components.com
You can find more by solving the problem then by 'asking the question'.