Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Blurring the background

Guest
Jan 19, 2011 Jan 19, 2011

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

TOPICS
ActionScript
969
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 19, 2011 Jan 19, 2011

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.

Translate
LEGEND ,
Jan 19, 2011 Jan 19, 2011

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/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 19, 2011 Jan 19, 2011

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();

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 19, 2011 Jan 19, 2011

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 20, 2011 Jan 20, 2011

Thanks so much, it works great!

Phil

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 20, 2011 Jan 20, 2011

You're welcome

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 15, 2011 Jun 15, 2011

Oh man is this file available somewhere else? I'm looking for something just like this!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 20, 2011 Jun 20, 2011
LATEST

make it yourself using the information here.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines