1.) because the property does not return a reference to the true
filters-array of the movieclip. Just a copy of it. So you need to assign it
back to the movieclip after you've edited it.

2.) you can't if it's not the only filter applied. If not you should loop
through the array looking for an instance of the "DropShadowFilter" class.
You haven't already you need to import the class
"flash.filters.DropShadowFilter"

The following code will search for the dropshadow in the array and set it's
quality property to 15.

var myList:Array = myMC.filters;
for(i in myList)
{
        if(myList[i] instanceof DropShadowFilter)
        {
                myList[i].quality = 15;
                break;
        }
}

myMC.filters = myList;

/Johan
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Charles
Parcell
Sent: den 24 januari 2006 07:03
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Access DropShadow filter via AS?


Two questions....

1) Why couldn't I just do...
myMC.filters[0].quality = 15;

2) In your example, how do you know that DropShadow is at index 0?

Thanks,
Charles P.


On 1/23/06, M S <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> var myList:Array = myMC.filters;
> myList[0].quality = 15;
> myMC.filters = myList;
>
> should do it, the filters array is a property of the MovieClip object,
> from
> there you can access all of the properties of said indexed filter.
>
> Peace, Mike
>
>
> On 1/23/06, Charles Parcell <[EMAIL PROTECTED]> wrote:
> >
> > Does anyone know how to access the parameters of a dropshadow attached
> > (part
> > of) a MC?
> >
> > Thanks,
> > Charles P.
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to