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

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

New Here ,
Nov 29, 2010 Nov 29, 2010

Copy link to clipboard

Copied

I get this error:

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

Here is my code:

import fl.transitions.*;
import fl.transitions.easing.*;

//Assign CLICK listeners for each menu button
Home.addEventListener (MouseEvent.CLICK, buttonClicked);
Big_Square_Baling.addEventListener (MouseEvent.CLICK, buttonClicked);
Wrapping.addEventListener (MouseEvent.CLICK, buttonClicked);
Chopping.addEventListener (MouseEvent.CLICK, buttonClicked);
Tillage.addEventListener (MouseEvent.CLICK, buttonClicked);
Raking.addEventListener (MouseEvent.CLICK, buttonClicked);

//Make the buttons look like buttons
Home.buttonMode = true;
Big_Square_Baling.buttonMode = true;
Wrapping.buttonMode = true;
Chopping.buttonMode = true;
Tillage.buttonMode = true;
Raking.buttonMode = true;

//This loader is used to load the external swf files
var loader:Loader;

//URLRequest stores the path to the file to be loaded
var urlRequest:URLRequest;

//This array holds all the tweens, so they
//don't get garbage collected
var tweens:Array = new Array();

//Stores the current page we are displaying
var currentPage:MovieClip = null;

//Stores the next page that we are going to display
var nextPage:MovieClip = null;

//This function is called when a menu button is clicked
function buttonClicked (e:Event):void {

//Create a new loader instance
loader = new Loader();

//If we clicked the first button, we load the the Home page
if (e.target == Home) {

urlRequest = new URLRequest("Home.swf");
loader.load (urlRequest);
}

//If we clicked the second button, we load the Big Square Baling page
else if (e.target == Big_Square_Baling) {

urlRequest = new URLRequest("Big_Square_Baling.swf");
loader.load (urlRequest);
}

//We load the Big Square Bale Wrapping page since we know that the home page or the Big Square Baling page
//is not clicked
else if (e.target == Wrapping) {

urlRequest = new URLRequest("Wrapping.swf");
loader.load (urlRequest);
}

//We load the Chopping page since we know that the home page, the Big Square Baling page, or the
//Big Square Bale Wrapping page is not clicked
else if (e.target == Chopping) {

urlRequest = new URLRequest("Chopping.swf");
loader.load (urlRequest);
}

//We load the Tillage page since we know that that the home page, the Big Square Baling page, the
//Big Square Bale Wrapping page, and the Chopping page is not clicked
else if (e.target == Tillage) {

urlRequest = new URLRequest("Tillage.swf");
loader.load (urlRequest);
}

//We load the Raking page since we know that the home page, the Big Square Baling page, the
//Big Square Bale Wrapping page the Chopping page, and the Tillage page is not clicked

else {

  urlRequest = new URLRequest("Raking.swf");
  loader.load (urlRequest);
}

//We want to know when the next page is finished loading
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, fileLoaded);

}

//This function is called, when we have finished loading a content page
function fileLoaded(e:Event):void {

//The loader contains the page we are going to display.
nextPage = e.target.content;

//Let's animate the current page away from the stage.
//First, we need to make sure there is a current page on the stage.
if(currentPage != null) {

  //Tween the current page from left to the right
  var tweenX:Tween = new Tween(currentPage, "x", Regular.easeOut,
      currentPage.x, 500, 1, true);

  //Decrease the alpha to zero
  var tweenAlpha:Tween = new Tween(currentPage, "alpha", Regular.easeOut,
      1, 0, 1, true);

  //Push the tweens into an array
  tweens.push(tweenX);
  tweens.push(tweenAlpha);

  //currentPageGone will be called when the tween is finished
  tweenX.addEventListener(TweenEvent.MOTION_FINISH, currentPageGone);
}

//There is no current page, so we can animate the next
//page to the stage. The animation is done in
//the showNextPage function.
else {
  showNextPage();
}
}

//This function animates and displayes the next page
function showNextPage():void {

  //Tween the next page from left to the center
  var tweenX:Tween = new Tween(nextPage, "x", Regular.easeOut,
      -200, 0, 1, true);

  //Tween the alpha to from 0 to 1
  var tweenAlpha:Tween = new Tween(nextPage, "alpha", Regular.easeOut,
      0, 1, 1, true);

  //Push the tweens into an array
  tweens.push(tweenX);
  tweens.push(tweenAlpha);

  //Add the next page to the stage
  addChild(nextPage);

  //Next page is now our current page
  currentPage = nextPage;
}

//This function is called when the current page has been animated away
function currentPageGone(e:Event):void {

//Remove the current page completely
removeChild(currentPage);

//Let's show the next page
showNextPage();
}

TOPICS
ActionScript

Views

7.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
Community Expert ,
Nov 29, 2010 Nov 29, 2010

Copy link to clipboard

Copied

you're using an incorrect path and/or file name for something you're trying to load.


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
New Here ,
Nov 29, 2010 Nov 29, 2010

Copy link to clipboard

Copied

id c what could be wrong for a path?

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
Community Expert ,
Nov 29, 2010 Nov 29, 2010

Copy link to clipboard

Copied

those swfs may not be in your class path.


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
New Here ,
Nov 29, 2010 Nov 29, 2010

Copy link to clipboard

Copied

what u mean my class path?

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
Community Expert ,
Nov 29, 2010 Nov 29, 2010

Copy link to clipboard

Copied

your swf files must be in your class path.  in most circumstances, using the code you're using, that means the all the swfs should be in the same folder as your fla and your html files.  ie, all your flash files should be in the same folder.

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
New Here ,
Dec 01, 2010 Dec 01, 2010

Copy link to clipboard

Copied

but they are all in the same folder and im still getting the error?

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
Community Expert ,
Dec 01, 2010 Dec 01, 2010

Copy link to clipboard

Copied

then the file name is incorrect.

if you can't see the error, upload your files and post a link.

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
Explorer ,
Dec 01, 2010 Dec 01, 2010

Copy link to clipboard

Copied

LATEST

To help figure out what's wrong, you can use an absolute path to your SWF files. (Such as "C:/Program Files/My Project/MySWF.swf") If the error goes away, then the filename is correct and there is simply some confusion as to where the local path is. Remember that the parent project (your main.swf) should be in the exact same directory as the SWFs being loaded)

~Plystire

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
Community Beginner ,
Nov 29, 2010 Nov 29, 2010

Copy link to clipboard

Copied

Check Swfs  path iam tested  it is working fine Check Your paths once again. swf file like("Wrapping.swf","Chopping.swf",....) palced in main folder.

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