Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE FLASH: Adobe Flash ForumAdobe Flash TutorialsAdobe Flash Video TutorialsWeb Streaming ForumAdobe Flash

[AS2.0] How do I take a filter off in A.S.?

Cow Forums : Adobe Flash
[AS2.0] How do I take a filter off in A.S.?
by Clint Milner on Jul 23, 2008 at 9:31:29 am

I'm using drop-shadows on movie clips to act as roll-over images for a navigation bar. I want to know if there is an easier way to create the OFF state of the movie clip rather than just having an invisible drop shadow. Code Below:

//import filter class
import flash.filters.DropShadowFilter;

//rollover drop shadows
var myShadow:DropShadowFilter = new DropShadowFilter(3,45,0x000000,100,5,5,1,1,false,false,false);

var myShadowOff:DropShadowFilter = new DropShadowFilter(3,45,0x000000,0,5,5,1,1,false,false,false);

//rollover/rolloff functions
dataProtection_mc.onRollOver = function () {
dataProtection_mc.filters = [myShadow];
}
dataProtection_mc.onRollOut = function() {
dataProtection_mc.filters = [myShadowOff];
}




Many thanks in advance,
Clint Milner
Buckinghamshire, England


Respond to this post   •   Return to posts index

Re: [AS2.0] How do I take a filter off in A.S.?
by Sher Ali on Jul 23, 2008 at 9:37:59 am

why don't you just assign an empty array to remove the filters? Like:

//import filter class
import flash.filters.DropShadowFilter;

//rollover drop shadows
var myShadow:DropShadowFilter = new DropShadowFilter(3,45,0x000000,100,5,5,1,1,false,false,false);


//rollover/rolloff functions
dataProtection_mc.onRollOver = function () {
dataProtection_mc.filters = [myShadow];
}
dataProtection_mc.onRollOut = function() {
dataProtection_mc.filters = [];
}


Sher Ali
Flash & Flex Developer
website: http://www.webeyestudio.com
blog: http://www.kabulinteractive.com/blog
My FlashDen Portfolio

Respond to this post   •   Return to posts index

Re: [AS2.0] How do I take a filter off in A.S.?
by Clint Milner on Jul 23, 2008 at 9:47:12 am

even more simple than i thought. don't know where my brain is today, but thank you.



Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINEDVDsBOOKSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]