Solved

Fade in Actionscript filter

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to put actionscript code for a button? 6 129
Adobe Flash Player : screen freezes for a few GUI & Rdp 5 623
Embedded Video Download (Flash) 3 1,157
Online Course Not Responding 3 93
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

770 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