FORUMS: list search recent posts

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

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Clint Milner
[AS2.0] How do I take a filter off in A.S.?
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


Return to posts index

Sher Ali
Re: [AS2.0] How do I take a filter off in A.S.?
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


Return to posts index

Clint Milner
Re: [AS2.0] How do I take a filter off in A.S.?
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.



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]