0 Replies Latest reply on Nov 29, 2006 8:32 PM by susarasus

    Help with Reference Error 1074

    susarasus
      Can someone point me to discover what I did wrong here in this package ?


      package {
      import flash.display.Sprite;
      import flash.text.TextField;
      import flash.text.TextFormat;
      import flash.geom.Matrix;
      import flash.display.BitmapData;
      import flash.events.Event;
      import ascb.drawing.*;
      import flash.display.Loader;
      import flash.net.URLRequest;

      public class saras01 extends Sprite {
      private var _loader:Loader;

      public function saras01() {
      _loader:Loader = new Loader();

      //loader.load(new URLRequest(" http://home.comcast.net/~geosaras/images/me_lg.jpg"));

      _loader.load(new URLRequest(" http://home.comcast.net/~geosaras/thumbs/zuz_sm.jpg"));
      //-loader.load(new URLRequest(" http://home.comcast.net/~geosaras/images/zuz_lg.jpg"));
      _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoad);

      }
      private function onImageLoad(event:Event):void {
      var bitmap:BitmapData = new BitmapData(_loader.width, _loader.height);
      bitmap.draw(_loader, new Matrix());
      var matrix:Matrix = new Matrix();
      matrix.scale(.1, .1);
      var sampleSprite:Sprite = new Sprite();
      sampleSprite.graphics.lineStyle();
      sampleSprite.graphics.beginBitmapFill(bitmap, matrix);
      sampleSprite.graphics.drawCircle(100,100,100);
      sampleSprite.graphics.endFill();
      addChild(sampleSprite);

      }
      }
      }


      package {
      import flash.display.Sprite;
      import flash.text.TextField;
      import flash.text.TextFormat;
      import flash.geom.Matrix;
      import flash.display.BitmapData;
      import flash.events.Event;
      import ascb.drawing.*;
      import flash.display.Loader;
      import flash.net.URLRequest;

      public class saras01 extends Sprite {
      private var _loader:Loader;

      public function saras01() {
      _loader:Loader = new Loader();

      //loader.load(new URLRequest(" http://home.comcast.net/~geosaras/images/me_lg.jpg"));

      _loader.load(new URLRequest(" http://home.comcast.net/~geosaras/thumbs/zuz_sm.jpg"));
      //-loader.load(new URLRequest(" http://home.comcast.net/~geosaras/images/zuz_lg.jpg"));
      _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoad);

      }
      private function onImageLoad(event:Event):void {
      var bitmap:BitmapData = new BitmapData(_loader.width, _loader.height);
      bitmap.draw(_loader, new Matrix());
      var matrix:Matrix = new Matrix();
      matrix.scale(.1, .1);
      var sampleSprite = new Sprite();
      sampleSprite.graphics.lineStyle();
      sampleSprite.graphics.beginBitmapFill(bitmap, matrix);
      sampleSprite.graphics.drawCircle(100,100,100);
      sampleSprite.graphics.endFill();
      addChild(sampleSprite);

      }
      }
      }