?
Solved

Fade in Actionscript filter

Posted on 2009-07-09
5
Medium Priority
?
276 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 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
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 use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses
Course of the Month9 days, 19 hours left to enroll

762 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