Home
> FlashEff 1 (Discontinued version)
> Topic
Using the free Flash Eff Demo in FlashDevelop
Posted by MarcelUrbanek
|
Using the free Flash Eff Demo in FlashDevelop December 26, 2008 08:31AM | Registered: 4 years ago Posts: 1 |
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:
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.
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();
greenRect.graphics.beginFill(0x00FF00);
greenRect.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
addChild(greenRect);
//The debuglabel will show the current effect variation
var debuglabel:TextField=new TextField();
debuglabel.width = 300;
addChild(debuglabel);
//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.x=100;
textlabel.width = 500;
textlabel.embedFonts = true;
textlabel.setTextFormat(format);
this.addChild(textlabel);
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)
{
removeChild(myEffect);
}
i++;
//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);
myEffect.target = textlabel;
myEffect.showTransition = myPattern;
myEffect.show();
//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 11:04AM | Admin Registered: 5 years ago Posts: 270 |
|
Re: Using the free Flash Eff Demo in FlashDevelop January 14, 2009 07:27PM | Registered: 4 years ago Posts: 3 |
|
Re: Using the free Flash Eff Demo in FlashDevelop April 15, 2009 09:18AM | Registered: 4 years ago Posts: 1 |
|
Re: Using the free Flash Eff Demo in FlashDevelop October 29, 2009 01:52PM | Registered: 3 years ago Posts: 2 |
Sorry, only registered users may post in this forum.






