Home
> FlashEff 2.0 Flex
> Topic
Any issues?
Posted by florodebat
Any issues? November 27, 2009 02:07PM | Admin Registered: 15 years ago Posts: 310 |
Re: Any issues? February 08, 2010 06:20PM | Registered: 14 years ago Posts: 3 |
It seems that somewhere between when a FlashEff2Flex instance is added to the display-tree and a transition is started, the target is being re-parented with no regard to its layering in its parent displayobjectcontainer.
In the following example, the red and green rectangle swaps depths when clicking the green rectangle.
I was expecting the layering to stay the same and the container.parent to be the same as expected (the Main class instance).
Maybe I just downloaded a lemon revision of the flex component??
In the following example, the red and green rectangle swaps depths when clicking the green rectangle.
I was expecting the layering to stay the same and the container.parent to be the same as expected (the Main class instance).
Maybe I just downloaded a lemon revision of the flex component??
package { import com.jumpeye.Events.FLASHEFFEvents; import com.jumpeye.flashEff2.symbol.alpha.FESAlpha; import flash.events.MouseEvent; import flash.display.Sprite; /** * A Document class to compile with the flex sdk compiler */ public class Main extends Sprite { private var myEffect:FlashEff2Flex; private var container:Sprite; private var overlay:Sprite; public function Main() { container = new Sprite(); container.graphics.beginFill(0x00CC00, 1); container.graphics.drawRect(200, 100, 300, 200); container.graphics.endFill(); addChild(container); overlay = new Sprite(); overlay.graphics.beginFill(0xCC0000, 1); overlay.graphics.drawRect(50, 50, 300, 200); overlay.graphics.endFill(); addChild(overlay); container.buttonMode = true; container.addEventListener(MouseEvent.CLICK, onClick); } private function onClick(event : MouseEvent) : void { trace("onClick() container.parent: "+container.parent); myEffect = new FlashEff2Flex(); myEffect.addEventListener(FLASHEFFEvents.TRANSITION_END, onTransitionEnd, false, 0, true); myEffect.showAutoPlay = false; myEffect.hideDelay = 0; addChild(myEffect); myEffect.target = container; var showPattern:FESAlpha = new FESAlpha(); showPattern.preset = 13; showPattern.tweenDuration = 0.5; myEffect.showTransition = showPattern; myEffect.show(); } private function onTransitionEnd(event : FLASHEFFEvents) : void { trace("onClick() container.parent: "+container.parent); } } }
Re: Any issues? February 24, 2010 08:52AM | Admin Registered: 15 years ago Posts: 310 |
Re: Any issues? March 04, 2010 10:48AM | Registered: 14 years ago Posts: 3 |
Re: Any issues? March 24, 2010 04:07PM | Admin Registered: 15 years ago Posts: 310 |
Sorry, you do not have permission to post/reply in this forum.