Autohide FlashEff?

Posted by krumedia 
Autohide FlashEff?
February 09, 2011 11:00AM
Hello,

in the following scenario there is a main view and the user is able to open controls in a popup view.
The animations for the popup work fine. But the object of FlashEff2Flex does prevent the main view from getting mouse events.

Is there a way to auto hide also the object of FlashEff2Flex (the visibility of the popup is toggled the right way).

<s:Group>

  <!-- Input text fields, buttons, etc here. Need mouse events. -->
  <my:MainControl ... />

  <s:Group>
    <!-- Input text fields, buttons, etc here. Need mouse events. -->
    <my:PopupControl ... />
    <FlashEff2Flex ... />
  </s:Group>

</s:Group>
Re: Autohide FlashEff?
February 09, 2011 12:16PM
Solved using a derived class:

	public class MyFlashEff extends FlashEff2Flex 
	{
		
		public function MyFlashEff() 
		{
			super();
			
			this.includeInLayout = false;
			this.showAutoPlay = false;
			this.hideAutoPlay = false;
			
			addEventListener(FLASHEFFEvents.TRANSITION_START, effectStarting);
			addEventListener(FLASHEFFEvents.TRANSITION_END, effectEnding);
		}
		
		private function effectStarting(e:FLASHEFFEvents):void 
		{
			this.visible = true;
		}
		
		private function effectEnding(e:FLASHEFFEvents):void 
		{
			if (currentTransitionType == "hide")
			{
				this.visible = false;
			}
		}
	}
Re: Autohide FlashEff?
February 10, 2011 12:46AM
I'm glad that you solved the problem and thank you for posting it.
Sorry, only registered users may post in this forum.

Click here to login