# Using filters on imported classes that uses API

**URL:** <https://forum.kirupa.com/t/using-filters-on-imported-classes-that-uses-api/170680>\
**Category:** Uncategorized\
**Created:** [November 28, 2005, 8:14pm UTC](https://forum.kirupa.com/t/using-filters-on-imported-classes-that-uses-api/170680 "2005-11-28T20:14:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitras](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nitras/32/1475_2.png) [@nitras](https://forum.kirupa.com/u/nitras)\
**Post date:** [November 28, 2005, 8:14pm UTC](https://forum.kirupa.com/t/using-filters-on-imported-classes-that-uses-api/170680/1 "2005-11-28T20:14:54Z")

</div>

so hi there once more.

i’ve written a simple lineTo script that i wrote as a class.  
it uses standard API

now here comes my nightmare, as i was neuroticly suspecting i just could place a dropshadow as-based script on the line that is drew. i suddenly woke up and faced my fiend.

has anyone tried it yet?  
i got this “fine” piece of error.

```auto
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 16: There is no property with the name 'filters'.
myCable.filters = [Ds];

```

where myCable is the var that is been loaded from the as.

i also tried to place the dropshadow script into the class but i get an even more weird statement such as

```auto
**Error** C:\Cable.as: Line 3: Import statements are not allowed inside class or interface definitions.
	 import flash.filters.DropShadowFilter;

**Error** C:\Cable.as: Line 4: The class or interface 'DropShadowFilter' could not be loaded.
	 var Ds:DropShadowFilter = new DropShadowFilter (2,45,0xffffff,60,5,5,2,3,false,false,false);

```

don’t flame me, i am fairly new to classes, but there must be a way to do this. flash is so flexible…maybe a bit too much if you catch my drift

can anyone enlighten me?
