Quantcast
Channel: Adobe Community : Discussion List - Using Flash Builder
Viewing all articles
Browse latest Browse all 1802

Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

$
0
0

Hello,

 

I have just recently started using the Flash platform and working with ActionScript. I have started a small project and attempting to load a PNG file onto the stage. I have an image directory within the project folder and have the following code which is generating the error.

 

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 Kitties extends Sprite

    {

        //Declare the variables for the background.

        public var backgroundURL: URLRequest;

        public var backgroundLoader: Loader;

        public var background: Sprite;

      

        public function Kitties()

        {

            backgroundURL = new URLRequest();

            backgroundLoader = new Loader();

            background = new Sprite();

          

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

            backgroundLoader.load(backgroundURL);

            background.addChild(backgroundLoader);

            stage.addChild(background);

        }

    }

}

 

Unfortunately I was unable to locate a code block to contain this and there is no syntax highlighting for ActionScript within the forum?

 

Thanks.


Viewing all articles
Browse latest Browse all 1802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>