<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Filter doesn't work</title>
<description> I have a simple component for which I have copied the code from the tutorial file &amp;quot;2 Apply a FlashEff2 filter&amp;quot;.
I am using Flash Builder 4.5, so I have changed the code according to the instructions in the forum.
Still, I don't see anything on the stage, it doesn't work. If I remove the filter I do see the image. 
Following is my code, please help:

&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;
&amp;lt;s:Group xmlns:fx=&amp;quot;[ns.adobe.com];
xmlns:s=&amp;quot;library://ns.adobe.com/flex/spark&amp;quot;
xmlns:mx=&amp;quot;library://ns.adobe.com/flex/mx&amp;quot;
width=&amp;quot;95&amp;quot; height=&amp;quot;65&amp;quot; contentBackgroundColor=&amp;quot;#3F3F3F&amp;quot; &amp;gt;
&amp;lt;!-- The target object will be an image called &amp;quot;myImage&amp;quot; - you have to define the name property. --&amp;gt;
&amp;lt;!-- It is a good practice to set the size for the Image object to the actual
size of the image, otherwise the effects will not work due to an incorrect size
of the Image component --&amp;gt;
&amp;lt;mx:Image width=&amp;quot;400&amp;quot; height=&amp;quot;300&amp;quot; source=&amp;quot;myImage.jpg&amp;quot; id=&amp;quot;myImage&amp;quot; name=&amp;quot;myImage&amp;quot; autoLoad=&amp;quot;true&amp;quot; scaleContent=&amp;quot;true&amp;quot; complete=&amp;quot;loadComplete()&amp;quot; /&amp;gt;
&amp;lt;fx:Script&amp;gt;
&amp;lt;![CDATA[
import FlashEff2Flex;

import com.jumpeye.flashEff2.filter.reflection.FEFReflection;

private var myEffect:FlashEff2Flex;
private var reflection:FEFReflection;

private function init(e:Event):void
{
myEffect._targetInstanceName = &amp;quot;myImage&amp;quot;;
reflection = new FEFReflection();
reflection.refresh = false;
reflection.reflectionAlpha = 0.8;
reflection.reflectionRatio = 150;
reflection.reflectionDistance = 0;

// Add the filter to the FlashEff2Flex instance.
myEffect.addFilter(reflection);
}

private function loadComplete():void {
// Once the image has been loaded, create the FlashEff2Flex component
// instance, set it up and apply it on the image.
myEffect = new FlashEff2Flex();
myEffect.addEventListener(Event.ADDED_TO_STAGE, init);
addElement(myEffect);

// Create the reflection filter instance and set it up as you like.


// Set the target object to the FlashEff2Flex instance. Once you do this,
// the filter will be applied immediately.

}
]]&amp;gt;
&amp;lt;/fx:Script&amp;gt;
&amp;lt;/s:Group&amp;gt;
</description><link>http://www.flasheff.com/forum/read.php?31,9966,9966#msg-9966</link><lastBuildDate>Wed, 22 May 2013 17:20:56 -0500</lastBuildDate>
<generator>Phorum 5.2.7</generator>
<item>
<guid>http://www.flasheff.com/forum/read.php?31,9966,9981#msg-9981</guid>
<title>Re: Filter doesn't work</title><link>http://www.flasheff.com/forum/read.php?31,9966,9981#msg-9981</link><description><![CDATA[ I'm glad to hear that you manage to find the problem and thank you for pointing it out.]]></description>
<dc:creator>kneo</dc:creator>
<category>FlashEff 2.0 Flex</category><pubDate>Thu, 17 May 2012 09:55:25 -0500</pubDate></item>
<item>
<guid>http://www.flasheff.com/forum/read.php?31,9966,9976#msg-9976</guid>
<title>Re: Filter doesn't work</title><link>http://www.flasheff.com/forum/read.php?31,9966,9976#msg-9976</link><description><![CDATA[ I have solved the problem.<br />I have added a setTimout function that will set the target after a delay of 100 milliseconds, and it works.]]></description>
<dc:creator>user1206761</dc:creator>
<category>FlashEff 2.0 Flex</category><pubDate>Thu, 17 May 2012 00:46:26 -0500</pubDate></item>
<item>
<guid>http://www.flasheff.com/forum/read.php?31,9966,9966#msg-9966</guid>
<title>Filter doesn't work</title><link>http://www.flasheff.com/forum/read.php?31,9966,9966#msg-9966</link><description><![CDATA[ I have a simple component for which I have copied the code from the tutorial file &quot;2 Apply a FlashEff2 filter&quot;.<br />I am using Flash Builder 4.5, so I have changed the code according to the instructions in the forum.<br />Still, I don't see anything on the stage, it doesn't work. If I remove the filter I do see the image.<br />Following is my code, please help:<br /><br /><pre class="bbcode">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Group xmlns:fx=&quot;[<a rel="nofollow"  href="http://ns.adobe.com/mxml/2009&quot">ns.adobe.com</a>];
		 xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
		 xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot;
		 width=&quot;95&quot; height=&quot;65&quot; contentBackgroundColor=&quot;#3F3F3F&quot; &gt;
	&lt;!-- The target object will be an image called &quot;myImage&quot; - you have to define the name property. --&gt;
	&lt;!-- It is a good practice to set the size for the Image object to the actual
	size of the image, otherwise the effects will not work due to an incorrect size
	of the Image component --&gt;
	&lt;mx:Image width=&quot;400&quot; height=&quot;300&quot; source=&quot;myImage.jpg&quot; id=&quot;myImage&quot; name=&quot;myImage&quot; autoLoad=&quot;true&quot; scaleContent=&quot;true&quot; complete=&quot;loadComplete()&quot; /&gt;
	&lt;fx:Script&gt;
		&lt;![CDATA[
			import FlashEff2Flex;
			
			import com.jumpeye.flashEff2.filter.reflection.FEFReflection;
			
			private var myEffect:FlashEff2Flex;
			private var reflection:FEFReflection;
			
			private function init(e:Event):void
			{
				myEffect._targetInstanceName = &quot;myImage&quot;;
				reflection = new FEFReflection();
				reflection.refresh = false;
				reflection.reflectionAlpha = 0.8;
				reflection.reflectionRatio = 150;
				reflection.reflectionDistance = 0;
				
				// Add the filter to the FlashEff2Flex instance.
				myEffect.addFilter(reflection);
			}
			
			private function loadComplete():void {
				// Once the image has been loaded, create the FlashEff2Flex component
				// instance, set it up and apply it on the image.
				myEffect = new FlashEff2Flex();
				myEffect.addEventListener(Event.ADDED_TO_STAGE, init);
				addElement(myEffect);
				
				// Create the reflection filter instance and set it up as you like.
				
				
				// Set the target object to the FlashEff2Flex instance. Once you do this,
				// the filter will be applied immediately.
				
			}
		]]&gt;
	&lt;/fx:Script&gt;
&lt;/s:Group&gt;
</pre>]]></description>
<dc:creator>user1206761</dc:creator>
<category>FlashEff 2.0 Flex</category><pubDate>Wed, 16 May 2012 07:41:35 -0500</pubDate></item>
</channel>
</rss>