• 13
• 18
• 19
• 27
• 9

# [web] shouldn't these calls work

This topic is 4167 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Alright I'm getting very frustrated with actionscript. Mostly due to the lack of good debugging. Anyway, I now have two function calls that are cutting short my development. From all I've read, I think they should work, and cannot understand why they don't have the desired effect. The first is for a dynamic drop shadow. I understand that referencing the filter directly (_mc.filters[0]) results in a copy of the filter, and yet...
//incrementNum increases for each element
var DS:DropShadowFilter = my_mc["obj" + incrementNum].filters[0];
DS.distance = 2.0*incrementNum;
my_mc["obj" + incrementNum].filters = [DS];

when called (within a loop in a function that I call when the mouse moves) does nothing to the distance of the drop shadow! It seems like it should. The second call is to set a mask. I create (in code) a viewport_mc with two movie clips attached (with attachMovie), an image and a green rectangle (in that order). In code, I call
viewport_mc["image_mc"].setMask("greenrect_mc")

and all that happens is the greenrect_mc is on top of the image_mc from when it was attached...no masking occurs. both of these seem like they should work as expected... yet they don't?! WTF?