Solved

Fade in Actionscript filter

Posted on 2009-07-09
5
274 Views
Last Modified: 2013-11-11
Hello,

I'm using actionscript to create and apply a glow filter to an object when the mouse is pointed at it. Currently, the glow filter comes in at full strength immediately, but I would like it to fade in from an alpha of 0 to 100. Is it possible to achieve this effect? My code below:
// Makes the filter available to use in the Movie.
import flash.filters.GlowFilter;
 
// Creates a variable with info about the Filter settings
var imageGlow = new GlowFilter (0xFFFFFF,.75,5,5,2,10,false,false,false);
 
image.onRollOver = function(){
	image.filters = [imageGlow];	
}

Open in new window

0
Comment
Question by:Spiderstave
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 22

Expert Comment

by:rascalpants
ID: 24817187
I would highly recommend you look at TweenMax...  it has the engine you need and is very easy to use...

http://blog.greensock.com/tweenmaxas3/


take a look at that site, and then come back if you have any questions as to how to implement.


rp
0
 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
ID: 24818196
actually, it looks like you need AS 2, right?

here is the link...


http://blog.greensock.com/tweenmaxas2/


and here is how you would implement a glowfilter


import gs.*;
import gs.easing.*;

TweenMax.to(mc, 1, {glowFilter:{color:0x91e600, alpha:1, blurX:30, blurY:30}});



rp
0
 

Author Comment

by:Spiderstave
ID: 24818267
That's a really cool tool, thanks for the heads up!
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 24818353
TweenMax is actually the standard now for animation...  I don't know of anyone who is using the native Tween class to animation anything... and with the added power of tinting and setting up filters, it works great...


rp
0
 

Author Comment

by:Spiderstave
ID: 24818506
Awesome, I will have to look into it in greater detail. Do you know if it uses less CPU resources than the native Tween class? I'm building a pan/zoom site right now: http://www.outshinehosting.com/ee/movement2.html, and the zooming is starting to get really sluggish. Granted, the movieclip that is being scaled has tons of large bitmaps in it, so there may be no way to make that animation smoother.

I'll try to implement TweenMax to solve another issue that has been plaguing me this week. I'm trying to zoom back in on the red crosshairs but I can't get it perfectly centered. It's scaling the container clip before I pan that is messing me up, I can't figure out how to compensate for the scaled container clip. I've had another question open regarding the issue for a couple of days and haven't gotten any responses. If it's something you are familiar with I'd be really grateful if you could take a quick look: http://www.experts-exchange.com/Software/Photos_Graphics/Web_Graphics/Macromedia_Flash/ActionScript/Q_24554564.html?cid=473

Thanks!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question