1 Reply Latest reply on Oct 29, 2008 5:39 AM by BarryGee

    DropShadow with imported AS3

    BarryGee Level 1

      I have successfully applied a drop shadow to a canvas with actionScript in a <mx:Script> tag block. However I want to keep the actionScript external to the MXML code. I have tried importing the drop shadow as code as shown below but I cant get the drop shadow to appear. If I include 'this.backgroundCanvas.filters = filters; in AddDropShadow.as as shown in the attached code I get the following error:

      1042: The this keyword can not be used in static methods. It can only be used in instance methods, function closures, and global code. PlayAIR/src/actionscript/com/barrygee/UI AddDropShadow.as line 24 1225277979009 855

      If i leave that line so that it only has filters = filters; no drop shadow appears.

      any help very welcome.