Problem using FESSquareFade in a class

Posted by DrPunchman 
Problem using FESSquareFade in a class
February 19, 2009 07:42PM
I am having issues with the FESSquareFade when brought in as as a class.

There are no errors reported, the effect (100) just does not show. I am calling the Blur the same way, and the Blur works perfectly every time.
Where am I messing up?




import FlashEff;
import com.jumpeye.Events.FLASHEFFEvents;
// Blur
import com.jumpeye.flashEff.symbol.blur.FESBlur;
// Square 
import com.jumpeye.flashEff.symbol.squareEffect.FESSquareFade;

// **** further down on the page ****

// --- TRANS IN
		private function	EFFtransIn ( num:uint )
		{
			_imgEffect 			= new FlashEff();
			_imgEffect.showAutoPlay 	= true;
			
			_creator.parent.addChild( _imgEffect );
			_imgEffect._targetInstanceName 		= _creator.name ;
			_imgEffect.addEventListener(FLASHEFFEvents.TRANSITION_END, EFFtransInFin );
			
			// -- the effect
			switch( num )
			{
				case 100:
					var _SF:FESSquareFade 	= new FESSquareFade();
					_SF.preset			= 19; // random
					_SF.squareWidth 		= 25;
					_SF.squareHeight		= 25;
					// -- call the effect
					_imgEffect.showTransition = _SF;
				break;
				default:
					var _B:FESBlur			= new FESBlur();
					_B.blurQuality 			= 3;
					_B.blurX 			= Math.floor( Math.random() * 50 );
					_B.blurY 			= Math.floor( Math.random() * 50 );
					// -- call the effect
					_imgEffect.showTransition = _B;
				break;
			}		
			
		}
		private function	EFFtransInFin ( e:Event):void
		{
			// trace( _creator + "\tEfftransIn Fin" );
		}



Edited 1 time(s). Last edit at 02/20/2009 01:23AM by DrPunchman.
Attachments:
open | download - example.zip (2.53 MB)
Re: Problem using FESSquareFade in a class
February 20, 2009 08:37AM
Interesting, would you please upload your fla and let me take a look at it, it will give a better idea of what is wrong.
Re: Problem using FESSquareFade in a class
February 20, 2009 11:03PM
I have attached the code, and I've noticed that the code works when "hide" but not on the "show" you will see the commented section in com/EXeffects.as
Re: Problem using FESSquareFade in a class
February 23, 2009 03:38PM
DrPunchman,

Here's quick fix to your problem: open your fla file; open Actions go to the 16th line of your code, delete it.
Go to the 17th line and change it to: FloatHere_mc[ "f" + i ].visible = false;
Compile and your done!
Re: Problem using FESSquareFade in a class
February 23, 2009 06:06PM
Sorry, you do not have permission to post/reply in this forum.