How to attach to TweenMax effect to viewClass.

Julian Cruz's Avatar

Julian Cruz

26 Apr, 2012 11:08 PM

Hi I need to attach to TweenMax to viewClass for example
[ Inject ]

public var myView:ViewContainer;

override public onRegister() : void{

    TweenMax.to( myView , 1 , { alpha : 1 } );

}

What's the correct way ?

Please help me, thank you.

  1. 1 Posted by Jerome Maurey-D... on 27 Apr, 2012 07:57 AM

    Jerome Maurey-Delaunay's Avatar

    Hi,

    Is your code not working?

    Otherwise, I don't think it's not correct, as long as it works and fits the needs of your project ;)

    Cheers,

    J.

  2. 2 Posted by Stray on 27 Apr, 2012 11:30 AM

    Stray's Avatar

    Hi,

    I would probably put the TweenMax effect in the parent for this view, because it's not great to put view logic in Mediators generally (onRegister will run again if your view is removed and added, though I know with a Tween it would not matter).

    It should work fine, but you'll eventually run into problems if you put anything heavier than this in your Mediator. (Stateful mediators for example are very brittle).

    Stray

  3. Ondina D.F. closed this discussion on 28 Jun, 2012 09:15 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac