Hello everybody!

I have a script saved in a file called "PixelatedOverlay.as"

This is the code:

Code:
package {
	
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.GradientType;
	import flash.display.StageScaleMode;
	import flash.display.CapsStyle;
	import flash.display.LineScaleMode;
	import flash.events.Event;
	import flash.geom.Matrix;

	[SWF(backgroundColor="0x222625")]
	public class PixelatedOverlay extends Sprite {

		private var grid:Sprite = new Sprite();
		private var gridMask:Sprite = new Sprite();
		private var gridWidth:Number = 3;

		public function PixelatedOverlay():void {

			stage.align = StageAlign.TOP_LEFT;
			stage.scaleMode = StageScaleMode.NO_SCALE;

                        // these are required for the mask to work!
			grid.cacheAsBitmap = true;
			gridMask.cacheAsBitmap = true;

			grid.mask = gridMask;
			
			this.addChild(grid);
			this.addChild(gridMask);

			stage.addEventListener(Event.RESIZE, resizeHandler);
			resizeHandler();

		}

		private function resizeHandler(e:Event = null):void {

			var i:Number;
			var j:Number;

			// draw fade out from center...
			var matr:Matrix = new Matrix();
			matr.createGradientBox(stage.stageWidth,stage.stageHeight,0);
			
			gridMask.graphics.clear();
                        // draw a radial gradient, from white to black (not visible)
                        // alphas from 1 -> 0.1 linearly from 0->255 (which equates to the width of the output
			gridMask.graphics.beginGradientFill(GradientType.RADIAL, [0xFFFFFF,0x000000], [1,0.1], [0,0xFF], matr);
			gridMask.graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight);
			gridMask.graphics.endFill();

                        // center it.
			gridMask.x = stage.stageWidth/2 - gridMask.width/2;
			gridMask.y = stage.stageHeight/2 - gridMask.height/2;

			// draw grid where it has potential to be visible.
			grid.graphics.clear();
			grid.graphics.lineStyle(0,0xFFFFFF,0.15,true,LineScaleMode.NORMAL,CapsStyle.SQUARE);
			j = gridMask.x + gridMask.width;
			for(i=gridMask.x; i<j; i+=gridWidth ) {
				grid.graphics.moveTo(i,0);
				grid.graphics.lineTo(i,stage.stageHeight);
			}
			j = gridMask.x + gridMask.height;
			for(i=gridMask.y; i<j; i+=gridWidth ) {
				grid.graphics.moveTo(0,i);
				grid.graphics.lineTo(stage.stageWidth,i);
			}
		}
	}
}
In a separate file (called "PixelatedOverlay.fla") that's in the same folder as the first one i have this code:

Code:
import PixelatedOverlay;

var obj:PixelatedOverlay;

obj = new PixelatedOverlay();

obj.identify();
When i run this i get an error:

"Call to a possibly undefined method identify through a reference with static type PixelatedOverlay"

What am i doing wrong?