Solved

Fade in Actionscript filter

Posted on 2009-07-09
5
273 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

Technology Partners: 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

Suggested Solutions

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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.

726 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