• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Flash Builder 4.6 Problem

Guest
Apr 04, 2013 Apr 04, 2013

Copy link to clipboard

Copied

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())

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

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Apr 08, 2013 Apr 08, 2013

Hi,

It says it is a problem on line 93 of file World.as.

A quick look made me check that this line is not ok shrinkButtonURL.url "../images/shrinkButton.png"; it should have an attribution symbol shrinkButtonURL.url = "../images/shrinkButton.png";

Votes

Translate

Translate
Community Beginner ,
Apr 08, 2013 Apr 08, 2013

Copy link to clipboard

Copied

Hi,

It says it is a problem on line 93 of file World.as.

A quick look made me check that this line is not ok shrinkButtonURL.url "../images/shrinkButton.png"; it should have an attribution symbol shrinkButtonURL.url = "../images/shrinkButton.png";

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 08, 2013 Apr 08, 2013

Copy link to clipboard

Copied

LATEST

Thank you so much!  I appreciate the help! 

Thanks!!!

DarkRue

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines