Copy link to clipboard
Copied
Hopefully someone can help.....
I have a very simple animation involving a number buttons with a fade in animation on the over state.
I've basically made a usual suspects line up, and when you rollover the person in the lineup, a new image fades into the foreground holding a plaque with their name on.
What I would like to happen is for background_mc to blur when ever one of the buttons is rolled over, but no idea how to achieve it.
You can see the animation at: http://www.shadowplay.co.uk/usual.swf
Thanks
Phil
In that example, mc_ball is the object that is being targeted for rollover and blurring, so in the code you have, you need to replace mc_ball with mc_back and philj_btn. The button gets the rollover/out assignments while the blur filter/tweening get associated with mc_back.
Copy link to clipboard
Copied
Download the file from the top of the page linked below and you should be able to adpt it to your design...
http://mrsteel.wordpress.com/2006/11/20/actionscript-20-blur-example/
Copy link to clipboard
Copied
If my button is called philj_btn, how would I change it so that mc_back is blurred when you rollover philj_btn?
Thanks
Phil
import flash.filters.BlurFilter;
import mx.transitions.Tween;
import mx.transitions.easing.*;
//
// postavljanje blur filtera na movieclip
var filter:BlurFilter = new BlurFilter(0, 0, 3);
var filterArray:Array = new Array();
filterArray.push(filter);
//
mc_ball.filters = filterArray;
mc_ball.blurred = 0;
//
mc_ball.onRollOver = function() {
var tw1:Tween = new Tween(mc_ball, "blurred", Strong.easeOut, mc_ball.blurred, 10, 20, false);
tw1["onMotionChanged"] = function() {
filter.blurX = mc_ball.blurred*5;
filter.blurY = filter.blurX;
mc_ball.filters = filterArray;
}
};
mc_ball.onRollOut = function() {
var tw1:Tween = new Tween(mc_ball, "blurred", Strong.easeOut, mc_ball.blurred, 0, 20, false);
tw1["onMotionChanged"] = function() {
filter.blurX = mc_ball.blurred*5;
filter.blurY = filter.blurX;
mc_ball.filters = filterArray;
}
};
stop();
Copy link to clipboard
Copied
In that example, mc_ball is the object that is being targeted for rollover and blurring, so in the code you have, you need to replace mc_ball with mc_back and philj_btn. The button gets the rollover/out assignments while the blur filter/tweening get associated with mc_back.
Copy link to clipboard
Copied
Thanks so much, it works great!
Phil
Copy link to clipboard
Copied
You're welcome
Copy link to clipboard
Copied
Oh man is this file available somewhere else? I'm looking for something just like this!
Copy link to clipboard
Copied
make it yourself using the information here.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now