2 Replies Latest reply: Apr 8, 2013 3:10 PM by DarkRue97 RSS

    Flash Builder 4.6 Problem

    DarkRue97 Community Member

      I am getting an error (TypeError: Error #2007: Parameter url must be non-null.

      at flash.display::Loader/_load()

      at flash.display::Loader/load()

      at GameWorld()[C:\Users\Conner\Adobe Flash Builder 4.6\GameWorld\src\GameWorld.as:93])

       

       

      and i have no idea how to fix it here is my code:

       

       

      package

      {

      import flash.display.Loader;

      import flash.display.Sprite;

      import flash.events.MouseEvent;

      import flash.net.URLRequest;

       

       

      [SWF(width="550", height="400",

      backgroundColor="#FFFFFF", frameRate="60")]

       

       

      public class GameWorld extends Sprite

      {

      //Declare the variables we need

      public var backgroundURL:URLRequest;

      public var backgroundLoader:Loader;

      public var background:Sprite;

       

       

      //Character

      public var characterURL:URLRequest;

      public var characterLoader:Loader;

      public var character:Sprite;

       

       

      //downbutton

      public var downButtonURL:URLRequest;

      public var downButtonLoader:Loader;

      public var downButton:Sprite;

       

       

      //growButton

      public var growButtonURL:URLRequest;

      public var growButtonLoader:Loader;

      public var growButton:Sprite;

       

       

      //shrinkButton

      public var shrinkButtonURL:URLRequest;

      public var shrinkButtonLoader:Loader;

      public var shrinkButton:Sprite;

       

       

       

       

      public function GameWorld()

      {

      //Add the background to the stage

      backgroundURL = new URLRequest();

      backgroundLoader = new Loader();

      background = new Sprite;

       

       

      backgroundURL.url = "../images/background.png";

      backgroundLoader.load(backgroundURL)

      background.addChild(backgroundLoader);

      stage.addChild(background);

       

       

      //Add the character to the stage

      characterURL = new URLRequest();

      characterLoader = new Loader();

      character = new Sprite;

       

       

      characterURL.url = "../images/character.png";

      characterLoader.load(characterURL)

      character.addChild(characterLoader)

      stage.addChild(character);

      character.x = 275;

      character.y = 200;

       

       

      //Add the downButton to the stage

      downButtonURL = new URLRequest();

      downButtonLoader = new Loader();

      downButton = new Sprite;

       

       

      downButtonURL.url = "../images/downButton.png";

      downButtonLoader.load(downButtonURL)

      downButton.addChild(downButtonLoader);

      stage.addChild(downButton)

      downButton.x = 5;

      downButton.y = 5;

       

       

      //Add the growButton to the stage

      growButtonURL = new URLRequest();

      growButtonLoader = new Loader();

      growButton = new Sprite;

       

       

      growButtonURL.url = "../images/growButton.png";

      growButtonLoader.load(growButtonURL)

      growButton.addChild(growButtonLoader)

      stage.addChild(growButton)

      growButton.x = 5;

      growButton.y = 55;

       

       

      //Add the shrinkButton to the stage

      shrinkButtonURL = new URLRequest();

      shrinkButtonLoader = new Loader();

      shrinkButton = new Sprite;

       

       

      shrinkButtonURL.url "../images/shrinkButton.png";

      shrinkButtonLoader.load(shrinkButtonURL)

      shrinkButton.addChild(shrinkButtonLoader)

      stage.addChild(shrinkButton)

      shrinkButton.x = 5;

      shrinkButton.y = 85;

      }

      }

      }

       

       

      Please can someone tell me what to do. I am a beginner with this stuff.

       

       

      Thanks,

      DarkRue97