Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




[F8] Tint Filter Effect?



Ok so I saw the site www.screenvader.com and thought holy lord this is cool, I want to learn how to do this.

I've managed to get the movement and blur down, but as any one does, I want to take it further. I wanted to know if there was a way to apply a tint filter effect as well, so that the objects would not have to be black (as it stands now, if the objects contain any colors, the depths look messed up, hence why I imagine the initial site referenced was done with black objects)

Here is the code I have attached to each object below, can someone tell me how I would work in a tint effect to coexist with the blur?? I dont use tint to begin with so I guess on that front I am a noob.

_root.Xcoef = 7.500000E-001;
X = _parent._x;
Y = _parent._y;
XS = _parent._xscale;
var fx1 = new flash.filters.BlurFilter();
fx1.quality = 1;
onEnterFrame = function ()
{
f = _root.Focale / 50;
if (_root.STOP == false)
{
DIST = Math.sqrt((X - _root._xmouse) * (X - _root._xmouse) + (Y - _root._ymouse) * (Y - _root._ymouse));
FUTURX = X + (X - _root._xmouse) * (_root.Zoom - DIST) / _root.Focale * (XS / 5);
FUTURY = Y + (Y - _root._ymouse) * (_root.Zoom - DIST) / _root.Focale * (XS / 5);
FUTURXS = XS + (50 - DIST / 5) * (XS / (f / 1.200000E+000));
Xdiff = FUTURX - _parent._x;
_parent._x = FUTURX - Xdiff * _root.Xcoef;
Ydiff = FUTURY - _parent._y;
_parent._y = FUTURY - Ydiff * _root.Xcoef;
XSdiff = FUTURXS - _parent._xscale;
_parent._xscale = FUTURXS - XSdiff * _root.Xcoef;
if (_parent._xscale < 50)
{
_parent._xscale = 50;
} // end if
_parent._yscale = _parent._xscale;
FLOUX = (f + DIST) / f;
FLOUY = (f + DIST) / f;
if (FLOUX > 15)
{
FLOUX = 15;
} // end if
if (FLOUY > 15)
{
FLOUY = 15;
} // end if
fx1.blurX = FLOUX;
fx1.blurY = FLOUY;
_parent.filters = [fx1];
} // end if
};



FlashKit > Flash Help > Flash ActionScript
Posted on: 06-16-2007, 01:59 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

HELP About Alpha Effect/ Tint Effect
please go to this link to download my file first:
http://www.geocities.com/linhm01/help.fla






I am doing on a project by doing a flash and now I am having a big big problem that I have no idea how to deal with. I hope someone here can help me.

Let me tell you what do I expect to see in my flash first.

I seperated some objects (ie. trees, recycle bin, light) by turning them into buttons. For each botton, later I would like to have some descriptions nearby.

I would like when people "mouseover" a button, everything (except the button) will be alpha or tint. That is to let people concentrate on the object that their mouses are over on.

I have made three buttons with the same alpha/tint effect in the .swf file attached. They are (trees), (light), and the (recycle bins).

Here are the procedures:
1: I made the trees into one button, and add effect

2: I made the light into one button, and add effect

3: I made the recycle bins into one button and add effect




but the outcome is that:

when i mouseover the tree: (i made this button 1st)


it turns out that all the buttons (3 buttons) can be seen clearly, while i expect that only TREE can be seen clearly and all others (including the buttons= recycle bins and the light) should be covered with "alpha" effect.

when i mouseover the light: (i made this button 2nd)

it turns out that 2 buttons can be seen clearly (while the 1st button i made, tree, is with alpha effect)

when i mouseover the recycle bin: (i made this button the last)

it is what i expected. that all buttons and everything are with alpha effect, except the recycle bin




i hope someone here can tell me the solution to solve it, thank you very much.

How To Achieve This Tint Effect?
http://www.sunsetunderwear.com

When you press the thumbnails the big images come with a cool effect. I think that is the tint effect but I cant do it so do u guys know how to do it?

[CS3] Animating The Tint Effect With The Tween Class
How is this done? Obviously it's easy to do inside the IDE, but how with AS 2.0?

Suppose say:

var tweenTint:Tween = new Tween(movie_name, "Property_name"

What would the property name be here? Is this even possible?

Removing Filter Effect
Filter is applied to object using actionscript.can any one tell me how to remove that filter from object using actionscript.

Filter Effect Transparent Mc
Yo.
I'm using this tutorial, http://www.kirupa.com/developer/flas...r_effects2.htm. The effect I'm after is highlighting parts of a photo, so the mc that I'm trying to make glow is a trace over the shape I need from the photo. The problem I'm having is getting the traced shape transparent so i can see the photo underneath. Every method I try removes the glow aswell. Any advice? Cheers in advance.

Fading Filter Effect In Button
After a long time away from Flash (not really touched it since version 4) I decided I had better get over hating it and back into it as it seemed silly to dismiss it completely. Anyway, on to my problem...

I want to create a button that is blurred (using the Flash 8 Pro filters), once you roll-over it becomes un-blurred (this I can do), but how do I make it so the effect fades off, I just can't get my head around it for some reason. I am betting it is a pretty simple solution.

Any help is much appreciated.

Melting In Effect, Convolution Filter
Dang, I wish I had an example to refer to the effect I want...but basically I'd like to start with a movieclip, and then as time passes, have that movieclip kind of melt away into whiteness...I was thinking maybe the convolution filter, in conjunction with the TWeen class, could help me with this. Unfortunately there doesn't seem to be many good resources on convolution.

Wicked Filter Effect Explanation
I recently stumbled across this wicked filter effect found here
and was hoping you guys might know how I too can achieve such an effect.

Thanks in advanced.

Displacement Map Filter Water Effect Like On Kneib.biz
Hello everyone,

I downloaded and decompiled the SWF at http://www.kneib.biz/f8files/water_with_f8.html. I've been studying it nonstop and tyring to understand how it works. Here is the code so you can have an idea about what i'm talking about:
Code:

map = new flash.display.BitmapData(500, 320, true, 0);
this.createEmptyMovieClip("bmp", 10);
bmp.attachBitmap(map, 0, "auto", true);
bmp.cacheAsBitmap = true;

blur = new flash.filters.BlurFilter();
blur.blurx = 30;
blur.blury = 30;
blur.quality = 6;

dmf = new flash.filters.DisplacementMapFilter();
dmf.mapBitmap = map;
dmf.mode = "ignore";
dmf.scaleX = -50;
dmf.scaleY = -50;
dmf.componentX = 1;
dmf.componentY = 1;
dmf.alpha = 1;
dmf.mapPoint = new flash.geom.Point(0, 0);

img.filters = [dmf];
bmp.filters = [blur];
i = 0;
z = 0;

this.onMouseMove = function ()
{
    var _loc1 = cont.attachMovie("tropfen", "t" + i++, i, {_x: _xmouse + 30, _y: _ymouse});
    _loc1.cacheAsBitmap = true;
};

this.onEnterFrame = function ()
{
    bmp._visible = false;
    map.draw(cont);
    map.draw(bmp);
    img.filters = [dmf];
};


I simply can't understand the draw method used with the BitmapData object in the onEnterFrame function. It is used passing the variable "bmp" which is the same movieclip that contains the BitmapDatat object and if the blur filter isn't applied to the "bmp" movieclip beforehand, it all doesn't work. Any insight on this is greatly appreciated!!

Bitmapdata, Apply Filter To One Channel? Realease A Filter
Hi there, I have two question:

Is it possible to apply a filter only to one channel or to access only one channel?
I've found somewhere:
Display.BitmapData.Channel.ALPHA
Is it something we can access at runtime?


When I appply a filter to a Bitmapdata, the Bitmapdata isn't really modified but just filtered, so if for example I copy one of its channel to another bitmapdata, I copy the source bitmap without the filter...
What I'd like to do is "release" the filter so it definetely modify the image. Is it a function to do so or can I only perform this by doing a screenshot of my MovieClip?


Thank you inadvance for your help.

Colormatrix Filter And Blur Filter Tween
Last edited by sks447 : 2006-10-17 at 15:11.
























I want to have a picture fade from blurry and grayscale to sharp and colorized. I have the blur to sharp part working ok. I have the grayscale to color to working ok. The only thing is the filters dont work together. Ive tried to push one into another with no luck yet. You can see the comments in the code below. Thanks.

ActionScript Code:
function blurFunction(myVar) {
    // init what movieclip to blur
    if (myVar == undefined) {
        myVar = promoContainer.p1;
    }
    // BLUR FILTER     
    import flash.filters.BlurFilter;
    import flash.filters.BitmapFilter;
    import flash.filters.ColorMatrixFilter;
    var blurFilter:BlurFilter = new BlurFilter(0, 0, 3);
    desaturation = 1;
    var filterArray:Array = new Array();
    filterArray.push(blurFilter);
    var blurX:Number = 100;
    var blurY:Number = 100;
    onEnterFrame = function () {
        prevPromo._visible = false;
        nextPromo._visible = true;
        if (desaturation>=1) {
            des = -0.03;
        } else if (desaturation<=0) {
            des = 0;
            delete (onEnterFrame);
        }
        desaturation += des;
        // color matrix 
        //myVar.filters = new Array(getDesaturationFilter(desaturation)); <---- I can have this....
        blurX -= 10;
        blurY -= 10;
        blurFilter.blurX = blurX;
        blurFilter.blurY = blurY;
        // blur filter 
        //myVar.filters = filterArray; <---- Or I can have this but not both.......
        if (blurY<=0) {
            blurY=0;
            blurX=0;
            //delete (onEnterFrame);
        }
    };
}
function getDesaturationFilter(t:Number):BitmapFilter {
    t = t != undefined ? t : 1;
    var r = 0.212671;
    var g = 0.715160;
    var b = 0.072169;
    trace("colormatrixfilter called");
    return new ColorMatrixFilter([t*r+1-t, t*g, t*b, 0, 0, t*r, t*g+1-t, t*b, 0, 0, t*r, t*g, t*b+1-t, 0, 0, 0, 0, 0, 1, 0]);
}

Tint
If I have a movie clip on stage, is it possible to apply TINT effect using Action Script ?

Thanks for your help

Mc Tint
I have a mc that I want to slowly tint on enterFrame. Can I do this with an action script?


Thank you

Tint In Swf
Hi everyone,
Im making an interactive program in which the user should be able to change the colout of a movieclip, is there anyway which i can put a scroll bar to edit the tint of the mc?

Thanks in advance

Matt

Tint
selectedGalleryBtn[selectedGalleryBtn.length - 1].alpha = 1;

Hi, How can I adapt this code so that it's tinted instead of alpha?
Thanks

Tint
var selectedGalleryBtn:Array = new Array();
addEventListener(Event.ENTER_FRAME, shadeGalleryBtn);
function shadeGalleryBtn(e:Event):void{
if(selectedGalleryBtn.length > 0){
selectedGalleryBtn[0].alpha = .6;
}
}


hi, i am trying to tint the selectedGalleryBtn instead of using alpha.
I can't seem to figure this out.
Thanks

Tint With AS
How can I script tinting?
I'm trying to script tinted into a movie clip.
I know about _alpha.. but I've never tinted with AS.

Hows it done?
I'm assuming its possible

Tint With AS
How can I script tinting?
I'm trying to script tinted into a movie clip.
I know about _alpha.. but I've never tinted with AS.

Hows it done?
I'm assuming its possible

Dynamic Tint
Hi, I am trying to change the color of a 3d rotating cube.

If I set tint to:

RGB:
255 255 0
Alpha
28%

I get the effect I want.

But, I would like to use code. I am using the following:




onClipEvent(load){
myColor = new Color(_root.CubeBase.CubeTop);
myColorTransform = new Object();

//percentage for the red component (-100 to 100)
myColorTransform.ra = 255;

//offset for the red component (-255 to 255)
myColorTransform.rb = 0;

//percentage for the green component (-100 to 100)
myColorTransform.ga = 255;

//offset for the green component (-255 to 255)
myColorTransform.gb = 0;

//percentage for the blue component (-100 to 100)
myColorTransform.ba = 0;

//offset for the blue component (-255 to 255)
myColorTransform.bb = 0;

//percentage for alpha (-100 to 100)
myColorTransform.aa = 28;

//offset for alpha (-255 to 255)
myColorTransform.ab = 0;

myColor.setTransform(myColorTransform);
}


The color is all flickery and the top bit does not look the same.

I understand that this may not be as clear as necessary, so you can see the difference here:
http://www.3ainteractive.com/temp/3ai.html

I would really like to be able to just set the tint settings dynamically...

M@)

Change Tint
Anyone know if its possible to change tint or advanced color selection through actionscript. i want to use different swatches
for each section of my site, but i dont want to have to make new
buttons.

Swap And Tint
how do you tint a symbol a certain color with certain percentage after a condition is proven to be true...
ex:

if ( variable == "red")
{
tint symbolA red 50%
}


AND


can you swap a symbol using actionscript???
like if i have a symbolA on the stage, but i want to swap it to symbolB, how would i do that using actionscript???

please help... either one of the question would be great...

Help With Changing TINT
Hope someone can help me out here.

I have created a button which will change the colour of my movieclip to red when pressed. However it changes it to full red, I just want to set it to 50% red (like if I had set the tint using properties panel and chosen red and set the slider to 50% - hope this makes sense!)

My button code looks like this...

on (press) {
carColor = new Color(carbody);
carColor.setRGB(0xff0000);
}

What do I have to add to change the percentage?

All help gratefully received!

Many thanks. Nick.

Alpha & Tint
Is there a 'simple' way to set the colour options of a movie clip through actionscript ?

Currently im using


Code:
_root.empty_mc._alpha = 15;


to set the alpha levels of a movieclip.
But id also like to tint colours within the clip in the same way as you can with a movieclip properties when placed manually on a scene.

Its possible by adding a movieclip with a block of colour above and then changing the alpha of that but is there a more simple way, actionscript way ?

thanks

Tint Vs Alpha?
This may have been asked here before but I have seen somewhere that using tint instead of alpha will produce a smaller file. Does anyone one know if it's true? I tried it with a very small file and both ways produced the same file size.

Rollover Tint
hey guys, i was wondering if sumone could tell me how to make it so that when the mouse is over mybutton it will slowly tint white up until about 45% and then stop and on roll out it will slowly fade back down. coz i seriously have no idea about this. i got the impression u had to use sumthing called setInterval but i dunno. any help would be appreciated.

Movieclip Tint..
Can anyone tell me how do i change the color(tint) of an mc with actionscript...
Thanks

Help With Image Tint...
Hey all, I've got this movieclip that I downloaded off of the site and I'm trying to add some code that would make the image thumbnails get brighter when you rollover them. (ideally, when clicked, I'd like them to stay bright until another thumbnail is pressed and then it fades back out, but let's start with just having it fade in?) I attached the gallery I'm trying to play with... the code is at the very bottom of the actionscript window. Any help would be awesome! thanks so much!

Where Are Tint And Alpha?
Where are either the tint or alpha keys in Flash MX for PC? I can't find either one anywhere.

Change Tint
is it possible to create and tween a tint effect via AS. I have searched and found some posts saying yes and some no.

I have an image that tweens on and then tints to 50% white. On rollover i want this to go back to 0% (display the real image). Then onclick i will load a new .swf

Tint Flicker
Don't suppose anyone would know where I can find a script or a tute to make a movie clip flicker a certain colour then change to that colour. I tried using setRGB but it does not work across levels.

Any ideas?

Get Tint Using Actionscript
Hi,

I have set the tint on a movieclip but when I do...


Code:
trace(tintClip.transform.colorTransform);
or even...


Code:
trace(tintClip.transform);
it outputs 'undefined'.

Any ideas?

Tint Bitmapdata HELP
Hi,
i have a bitmap that is tiled to fill the background.
How would i 'tint' the tile gradually with the press of a button.
eg. entering a certain section of the site gradually changes the tile shade to another color so that you can still see the picture on the tile
This is the code for the filling that works fine

import flash.display.BitmapData;

Stage.scaleMode = "noScale"
Stage.align = "TL";

var tile:BitmapData = BitmapData.loadBitmap("tile");

function fillBG() {
this.beginBitmapFill(tile);
this.moveTo(0,0);
this.lineTo(Stage.width,0);
this.lineTo(Stage.width,Stage.height);
this.lineTo(0,Stage.height);
this.lineTo(0,0);
this.endFill();
}

fillBG();

var stageL:Object = new Object();
stageL.onResize = function() {
fillBG();
}

Stage.addListener(stageL);
stageL.onResize();


i've tried the

import flash.geom.ColorTransform;

and attached the bitmap to an MC and then used

tile.colorTransform(tile.rectangle, new ColorTransform(1, 0, 0, 1, 255, 0, 0, 0));
but this colors the whole tile completely where the pattern dissapears(and not gradually)

Any ideas

Thanks

Trinitee

Tint Scroll Bar? Please Help
Hi everyone,
Im making an interactive program in which the user should be able to change the colout of a movieclip, is there anyway which i can put a scroll bar to edit the tint of the mc?

Thanks in advance

Matt

Changing Tint With AS
probably just to tired to think and I really havnt needed to do this until now, but how do you change the tint of an MC via AS?

Changing Tint Via AS
Is there a way to change a movie clip's tint using AS?

Tint Change With AS
Is it possible to change the tint of a movieclip using AS (probably by a button) - when the movieclip is not actually on the timeline at the time when the button is pressed?

IE The next time the movieclip is called for on the timeline it does not revert back to the default tint but keeps the tint value assigned by the button press.

many thanks for any input

Color Tint With As?
Hello,

i'm changing colors of a movieclip using buttons with the color Tranform class however the new colors are 100% saturation over the clip.

how would i reduce the tint or hue level so that the details of the movie clip show through?

thanks

Tint Percentage
hello all,

i have looked through the forums history but i can only find code that will help change the entire colour of the movieclip whereas i need it to have a tint percentage, you know just about 25 percent or so?
the code:

var my_color:Color = new Color(mc);
my_color.setRGB(10*124323);

aynone help?

sorry that ive just repeated a load of threads

[F8] SetRGB(), Is There A Way To Set % Of The Tint?
Greetings all.

I'm creating dynamic mcs, which also load .pngs. I want to put a color overlay on them, which can also be removed. (eg. they start off grey, and i want to put a green overlay, and then give the users the option to turn them back to grey... but the actual colors aren't really important)

If i have a standard mc already in my flv, i can obviously change the Tint to the color i want, and then also set the % so that it is just an overlay and not a solid color.
Is there a way to do this on dynamic mcs?
normally i use the code below to change the actual color:

myColor1 = new Color(furnClip_mc)
myColor1.setRGB(0xaaf09c);

but that makes the dynamic mc (furnClip_mc) totally green. How can i just make it say a 25% opacity?

TIA!

[F8] Dynamic Tint
Is it possible to add a tint to a movieclip dynamically?

[CS3] Colour Tint Help Please
Hi, I'm using the following code which I found through a thread on this forum, to gradually change the colour tint of a movie clip...
code:
myColor = new Color(_root.bgdvideo);
if(!ccc){_root.bgdvideo.setRGB(0x990000);
}else{
myColor.setRGB(ccc);
}
MovieClip.prototype.beginFade = function(dstX, durationOfFade) {
this.myColor = new Color(this);
this.srcX = this.myColor.getTransform();
this.dstX = dstX;
this.startOfFade = getTimer();
this.durationOfFade = durationOfFade;
this.onEnterFrame = function() {
var r = (getTimer()-this.startOfFade)/this.durationOfFade;
if (r>1) {
r = 1;
this.onEnterFrame = null;
}
var tX = {ra:this.srcX.ra*(1-r)+this.dstX.ra*r, rb:this.srcX.rb*(1-r)+this.dstX.rb*r, ga:this.srcX.ga*(1-r)+this.dstX.ga*r, gb:this.srcX.gb*(1-r)+this.dstX.gb*r, ba:this.srcX.ba*(1-r)+this.dstX.ba*r, bb:this.srcX.bb*(1-r)+this.dstX.bb*r, aa:this.srcX.aa*(1-r)+this.dstX.aa*r, ab:this.srcX.ab*(1-r)+this.dstX.ab*r};
this.myColor.setTransform(tX);
ccc = this.myColor.getRGB();
};
};
...this si the snippet which I use to change the colour of the clip...
code:
_root.bgdvideo.beginFade({ra:50, rb:64, ga:0, gb:0, ba:50, bb:64, aa:100, ab:100}, 1000);

If I have a specific colour I want the clip to gradually change to, how do I work out / specify the figures to go in the
'ra, rb, ga, gb, ba, bb, aa, ab' parts of the code...?
I have it working somewhat how I would like, but I'm guessing the figures through trial and error at the moment, and I would like to use specific colours.

...or, does anyone know of a better and more efficient way of gradually changing the tint of a movie clip?

Thanks for any help offered...
Jeff

[CS3] Help On TINT Button
I want to understand how does it work a tint button, like 4 ex

i have some difficulties on understanding the rollover roll out like 4 ex

thanks for you time

A

[CS3] I Can't Get TINT To Work... Please Help
Hi!

I'm trying to make an AS code to change the tint color of a textbox inside a movieclip, but I'm not getting there. I already searched on google, and I get some examples. I tried them all, but so far none works.

The one I'm trying now is:


Code:
//this goes on the timeline
ColorTrans = {ra:0, rb:211, ga:0, gb:70, ba:0, bb:15, aa:100, ab:0};
//this goes on the button
_root.empresa.empresatxt.setTransform(ColorTrans);
I tried to trace the ColorTrans variable, but it shows [object Object]

What am I doing wrong? how can I change the tint on the textbox?

Dynamic Tint
curious, if i have a movie clip and wanted to change the tint based on a given variable, is that possible? if so how? if not DAMN YOU ALL!

Tint Property In As 3
Hi

I want to tint a movieclip instance with as,

I can do alpha change like this , my_mc.alpha = .5;

how do I do with tint ?
I tried, setTint, or tintcolor , but don't work.

please help me.

Color Tint?
In the Flash IDE, it is really simple to tint a movieclip to the right color you want. Select the clip, set the color property to Tint and choose the percent of Tint Amount you want.

However, there seems to be no way to apply Tint Amount is AS3. I'm sure there is some way to do this through a complex formula of rgb offsets, but i can't figure it out. it blows my mind that this property exists in the IDE, but not actionscript.

Does anyone know a solution?

How To Change The Tint Of An Mc
Code:
//How to change the tint of an mc??

var ct:ColorTransform = new ColorTransform(1,1,1,1,1,1,0,0);

mc.transform.colorTransform=ct;

////doesnt seem to work
still how to cpmlpete this task?

Change Tint Of Mc?
Question, whats the actionscript for changing the tint of an image? I want to define the color values and %.

Actually, I want to make it so that when someone mouses over the mc it tweens the colors from the current one, to the new tint really smoothly, then when you mouseoff, it tweens back.

Any help?

Thanks a ton guys.

flash mx 2004.

<3

Change The Tint Value
I'm trying to alter the colour (tint) value of an MC via a button.
I can alter the transparency (alpha)
Why can't I alter the tint via the same code.

ActionScript Code:
on (release) {
    target=skinColour;
    setProperty(target,_alpha,myAlphaValue);
    setProperty(target,_tint,myTintValue);
}

Copyright © 2005-08 www.BigResource.com, All rights reserved