Using the free Flash Eff Demo in FlashDevelop

Posted by MarcelUrbanek 
Using the free Flash Eff Demo in FlashDevelop
December 26, 2008 02:31PM
I was just so amazed about the flash eff effects I wanted to try them myself. Because I have none of the Adobe commercial products, but only FlashDevelop, I tried to figure out how to get those components working in FlashDevelop. I'm posting this here, because it is a bit tricky, but I'm sure there are a lot of people who want to do the same thing.

Here is how it works:
1. Get the free (or commercial, should also work) jumpeye flash eff components. You will realize, that they are packaged as mxp File, a file format FlashDevelop cant handle. You will need mxplst, a total commander plugin which is able to unpack mxp Files.
2. You now have the swc files you need, to use flash eff with FlashDevelop.
You always need FlashEff.swc, this is the base library. If you want to use the Glow Effect for example you will also need FETGlow.swc which contains this effect. Drop both swc in your project directory and use the "Add To Library" function of FlashDevelop (right-click the library).
3. Add a font of your choice to the project directory, for example arial.ttf

Now you are ready to use flash eff. To get started you may use the following code snippet:

			//It is important to embed fonts for flash eff to work
			[Embed(source = 'arial.ttf', fontName = 'Arial', fontStyle = 'normal', fontWeight = 'normal', fontFamily = "Arial", mimeType = "application/x-font-truetype")] var font:Class;
			//Just draw a simple green background
			var greenRect: Sprite = new Sprite();;, 0, stage.stageWidth, stage.stageHeight);

			//The debuglabel will show the current effect variation
			var debuglabel:TextField=new TextField();
			debuglabel.width = 300;
			//Now we instanciate the to-be-animated textlabel
			var format:TextFormat = new TextFormat();
			format.font = "Arial";
			format.size = 40;
			format.color =  0xFFFFFF;
			var textlabel:TextField = new TextField();			
			textlabel.text = "Hello World!";
			textlabel.width = 500;
			textlabel.embedFonts = true;
			var i:Number = 0;
			var myEffect:FlashEff;
			//Add a mouseclick listener to the green rect
			greenRect.addEventListener("click", function():void {
				//if there is already an effect,remove it
				//this always makes sense, also when the effect is not visible				
				if (myEffect != null)
				//just set a few values, you may experiment with the tweenType or easeType
				var myPattern:FETGlow = new FETGlow();
				myPattern.preset = i;
				myPattern.maxBlurX = 10;
				myPattern.tweenType = "Bounce";
				myPattern.easeType = "easeOut";
				myPattern.tweenDuration = 1.5;

				myEffect = new FlashEff();
				myEffect.showTransition = myPattern;
				addChild(myEffect); = textlabel;
				myEffect.showTransition = myPattern;;
				//Show the current effect variation
				debuglabel.text = i + "";

A special hint: To understand the pattern parameters, you can have a look in the xml files bundled with the mxp, they will contain a description for every parameter and possible/valid values.
Re: Using the free Flash Eff Demo in FlashDevelop
December 26, 2008 05:04PM
Wow. Thank you very much Marcel for this post. I'm sure it will be of help to many others.
Re: Using the free Flash Eff Demo in FlashDevelop
January 15, 2009 01:27AM
Thanks, MarcelUrbanek, yesm you are right, many developers use FlashDevelop, this is a inspiring post.
Re: Using the free Flash Eff Demo in FlashDevelop
April 15, 2009 02:18PM
Great! I needed it. Thanks!

Re: Using the free Flash Eff Demo in FlashDevelop
October 29, 2009 06:52PM
I can see only some swf and a lot of xml files. No swc files. :(
Has Eff (into mxp) format changed?!?!
Help me, please!
Best regards,
Sorry, you do not have permission to post/reply in this forum.