Mask/filters for parent of flasheff'd element

Posted by krumedia 
Mask/filters for parent of flasheff'd element
February 03, 2011 02:45PM
Hello,

we would like to apply a mask and flash filters to a parent element. The flasheff2 animation starts to play but it is not affected by the mask and the bitmap filter.


	<s:Group width="600" height="450">
		<s:mask>
			<s:Group width="600" height="450">
				<s:Rect radiusX="15" width="600" height="450">
					<s:fill>
						<s:SolidColor color="#FFFFFF"/>
					</s:fill>
				</s:Rect>
			</s:Group>
		</s:mask>
		<s:filters>
			<s:GlowFilter color="#000000" blurX="10" blurY="10" strength="2" inner="true" />
		</s:filters>
			
		<mx:Image
			id="myImage"
			width="600" height="450"
			source="@Embed('Chrysanthemum.jpg')"
			/>
	</s:Group>
	
	<fx:Script>
		<![CDATA[
			import FlashEff2Flex;
			import com.jumpeye.flashEff2.symbol.brightSquares.FESBrightSquares;
			
			private var myEffect:FlashEff2Flex;
			private var showEffect:FESBrightSquares;
			
			// creationComplete
			private function init():void {
				myEffect = new FlashEff2Flex();
				
				showEffect = new FESBrightSquares();
				showEffect.squareWidth = 20
				showEffect.squareHeight = 20;
				showEffect.tweenDuration = 2;
				myEffect.showTransition = showEffect;
				
				addElement(myEffect);
				myEffect.target = myImage;
			}
		]]>
	</fx:Script>

Thank you,
Matthias
Re: Mask/filters for parent of flasheff'd element
February 03, 2011 03:33PM
Sorry, but is there a question?
Re: Mask/filters for parent of flasheff'd element
February 03, 2011 04:36PM
Hi,

there's no question, but i need help to get the mask and the filter working. If the flasheff effect is not applied the image is shown properly. But using the effect it bypasses the declaration of the mask and the filter.
Re: Mask/filters for parent of flasheff'd element
February 04, 2011 01:18PM
You want to apply a mask over an object on which you already applied a flasheff effect? If yes try to set the mask directly on flasheff.
Re: Mask/filters for parent of flasheff'd element
February 09, 2011 11:35AM
It works now. I've realized that the instance of FlashEff2Flex has to be appended to the masked element and not just to "this".

Greetings, Matthias
Sorry, you do not have permission to post/reply in this forum.