1 Looping show-hide effect not working in FB 4.5

Posted by user1028331 
1 Looping show-hide effect not working in FB 4.5
December 02, 2011 05:12AM
Issue : blank display area on running the project (import it to FB 4.5)

I bought Flash Eff premium Plus and imported the project 1 Looping show-hide effect from
FlashEff2_Premium_Plus\FlashEff2 Flex\Tutorial Files\Flex Builder 4\1 Looping show-hide effect

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="[ns.adobe.com]; xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"
			   frameRate="30" width="500" height="400">
	<!-- The target object will be an image called "myImage" - you have to define the name property. -->
	<!-- 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 -->
	<mx:Image  complete="loadComplete()" width="400" height="300" source="../images/logo.png" id="myImage" name="myImage" autoLoad="true" scaleContent="true" x="50" y="50"/>
	<fx:Script>
		<![CDATA[
			
			import FlashEff2Flex;
			import com.jumpeye.Events.FLASHEFFEvents;
			import com.jumpeye.flashEff2.symbol.brightSquares.FESBrightSquares;
			import com.jumpeye.flashEff2.symbol.equalizer.FESEqualizer;
			import mx.flash.UIMovieClip;
			
			private var myEffect:FlashEff2Flex;
			private var showEffect:FESBrightSquares;
			private var hideEffect:FESEqualizer;
			
			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();
				
				// The hide transition starts 3 seconds after the show transition
				// has endded.
				myEffect.hideDelay = 3;
				myEffect.addEventListener(FLASHEFFEvents.TRANSITION_END, restartShowEffect);
				
				// Create the show and hide pattern instances. These instances will
				// actually execute the show and hide effects.
				showEffect = new FESBrightSquares();
				showEffect.squareWidth = 20
				showEffect.squareHeight = 20;
				showEffect.tweenDuration = 2;
				myEffect.showTransition = showEffect;
				
				hideEffect = new FESEqualizer();
				hideEffect.equalizerPercentage = 50;
				hideEffect.tweenDuration = 2;
				myEffect.hideTransition = hideEffect;
				
				// The FlashEff2Flex instance MUST be added to the display list before
				// setting the target object.
				addElement(myEffect);
				myEffect._targetInstanceName = "myImage";
			}
			
			private function restartShowEffect(evt:FLASHEFFEvents):void {
				// Once the hide transition has endded, restart the show transition.
				var effectInstance:FlashEff2Flex = evt.target as FlashEff2Flex;
				if (effectInstance.currentTransitionType == "hide") effectInstance.show();
			}
		]]>
	</fx:Script>
</s:Application>


i used an image under <mx:image> (line 8) which works(displays) when i remove the complete handler (complete="loadComplete()") which assures tht the path to my image is fine.

Then i used complete event as loadcomplete and under loadcomplete i put a comment on line 48
myEffect._targetInstanceName = "myImage";
and then i get back the image without any show/hide effect. Seems like there is something wrong with above line

On going through the docs i found that
2. Examples
2.1 Create a looping show/hide effect
Create a new ActionScript 3.0 file, set the frame rate to 30 fps and place an image on the stage. Convert it into a MovieClip and give it the instance name of "myImage".

Observation : Seems like the Image is not converted to MovieClip before applying as a target for the show/hide effect

Please fix and commit the changes to the repository
Re: 1 Looping show-hide effect not working in FB 4.5
December 05, 2011 08:45AM
Please see this post:
[www.flasheff.com]
Re: 1 Looping show-hide effect not working in FB 4.5
October 23, 2014 10:44AM
Great thinking! That site always is best to consider as my first reference of thinking. Very superb post!
womens leather jacket
Re: 1 Looping show-hide effect not working in FB 4.5
October 23, 2014 10:45AM
The feature is formed with the excellent material of words. You have completed the need of this topic. thank you



Edited 1 time(s). Last edit at 10/23/2014 10:47AM by user1630619.
Re: 1 Looping show-hide effect not working in FB 4.5
June 17, 2015 12:12PM
Your article is very informative. Thanks for this information.
Please Visit The Winter Soldier Coat
Re: 1 Looping show-hide effect not working in FB 4.5
July 22, 2015 12:54PM
You have raised an important issue..Thanks for sharing..I would like to read more current affairs from this blog..keep posting...
Click Here Supernatural Coat
Re: 1 Looping show-hide effect not working in FB 4.5
July 28, 2015 12:45PM
Your article has helped me to understand this subject on a different level. I would like to appreciate your efforts for exploring this issue. Thank you for your information.
Sherlock Holmes Coat DesireLeather
Projection Clock
July 30, 2015 08:25AM
Completely authentic post! I like your unique style of writing, it’s clearly something to leverage. Thanks much

Projection Clock: [dubaivfm.com]
Sorry, you do not have permission to post/reply in this forum.