Page 1 of 1

Flash Filters Tutorial (Easy to use, very usefull)

PostPosted: Sat Jul 30, 2011 9:11 pm
by KaTsuO_O
I dont really know how I could explain what a filters is so Ill show you some examples. You know how boring a piece of text like this looks like:
Untitled 1069.png
Untitled 1069.png (5.3 KiB) Viewed 1722 times

There is actualy a way to make this piece of text more interesting without changing the font so instead I am going to use a filter and here is three examples of that:
Untitled 1070.png
Untitled 1070.png (5.25 KiB) Viewed 1722 times

Untitled 1071.png
Untitled 1071.png (5.41 KiB) Viewed 1722 times

Untitled 1074.png
Untitled 1074.png (4.83 KiB) Viewed 1722 times

The good thing is that it is very simple to add one, just click on the text you have created, go to properties (Ctrl+F3), open filters and click on the highlighted icon in the lower left corner of the image.
Untitled 1073.png
Untitled 1073.png (24.89 KiB) Viewed 1722 times

Now you should see a few options and what i used was glow because it is the most usefull one when it comes to text. Here is the setings for the three examples above:
Untitled 1075.png
Untitled 1075.png (12.34 KiB) Viewed 1722 times

I changed the text color to white on the second and changed the text color to blue on the third but that is everything i had to do to make the text look more interesting so I recomend you to always use a filter on text. Filters can not only be used on texts, it can also be used on movieclips or buttons and a filter that can be very usefull is the blur one. Experiment with filters and im sure you will be able to do even better stuff than before.

Btw, here is a file that i made previously: (hold the cursor over the square)
Click to Play
(Javascript Required)

Preview Window.swf [ 1.43 KiB | Viewed 1585 times ]


And here it is without any filter:
Click to Play
(Javascript Required)

Preview Window No Filters.swf [ 1.39 KiB | Viewed 1585 times ]


Re: Flash Filters Tutorial (Very usefull)

PostPosted: Sun Jul 31, 2011 1:07 am
by BlueLight
Yep a filter boy right here. I know how powerful they can be.

Re: Flash Filters Tutorial (Very usefull)

PostPosted: Sun Jul 31, 2011 8:08 pm
by GoRepeat
You can also manipulate filters with actions script. For example:
Code: Select All Code
var bf:GlowFilter = new GlowFilter(0xFFFFFF, 100, 15, 15, 3, 1, false, false);


creates a filter named "bf" that is a glow-type filter
0xFFFFFF = color of filter (can see hex when mousing over color palette)
100 = alpha (fade) of filter
15 = x blur
15 = y blur
3 = strength
1 = quality
false = knockout
false = inner glow

each property mirrors one on the tab in tutorial. This way you can change filters with variables as game plays. For example, in my game, mid and bosses have white shield that must come down before seduction works. This works by using glow filters. Code example:

Code: Select All Code
onClipEvent(load){
var bf:GlowFilter = new GlowFilter(0xFFFFFF, 100, 15, 15, 3, 1, false, false);
}


When movie clip (enemy) loads, creates filter

Code: Select All Code
onclipEvent(enterFrame){
this.filters = bf;
if(damaged){
bf.strength -= 1;
}
if(bf.strength < 1){
seduction script blah blah
}
}


sets movie clip filter to bf (created on load); reduces strength property of filter when enemy takes damage (0 is no filter); when filter is gone (0 strength) allows for seduction script to activate.

Warning though, filters are wonderful, but big sources of lag... use sparingly!

Re: Flash Filters Tutorial (Very usefull)

PostPosted: Mon Aug 01, 2011 12:17 am
by BlueLight
Never used action script my self but thank you.