0 Replies Latest reply on Oct 24, 2007 10:20 AM by miquael

    Loading an SWF into Flex?

    miquael Level 1
      So I am new to Flex (2), but understand the essentials. I am just wanting to load an external SWF into Flex, but am having this problem when executed:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at RotateXY$iinit()

      So the external SWF is a simple file that references an external .AS package class ... and by itself, it runs perfect. So doesn't it already include all the code it needs? Why would importing the SWF into Flex produce this error?

      Here is a sample of the package class:

      package {
      import flash.display.Sprite;
      import flash.display.StageAlign;
      import flash.display.StageScaleMode;
      import flash.events.Event;

      public class RotateXY extends Sprite
      private var balls:Array;
      private var numBalls:uint = 50;
      private var fl:Number = 250;
      private var vpX:Number = stage.stageWidth / 2;
      private var vpY:Number = stage.stageHeight / 2;

      public function RotateXY()

      private function init():void


      etc etc etc