Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8327337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:04:38+00:00 2026-06-09T01:04:38+00:00

I am creating a Flash engine, and I have an Loader class. When I

  • 0

I am creating a Flash engine, and I have an Loader class. When I open the .swf file in a map it works, but when I open it on my server it doesn’t. The HTTP Status returns a 200 so it means it has a connection but the Image does not display… How is this caused and how can I fix it?

package com.loading{
import flash.display.Loader;
import flash.media.Sound;
import flash.net.URLRequest;
import flash.events.Event;
import flash.events.ErrorEvent;
import flash.events.IOErrorEvent;
import flash.events.EventDispatcher;
import com.events.LoaderEvent;
import flash.media.SoundChannel;
import flash.events.HTTPStatusEvent;

public class Loader extends EventDispatcher {

    public var returnImages:Array = new Array();

    public var totalImages:int = 0;

    public function Loader() {
    }

    public function LoadImage(path:String) {
        var imgLoader:flash.display.Loader = new flash.display.Loader();
        imgLoader.contentLoaderInfo.addEventListener(LoaderEvent.COMPLETE, loadImageComplete);
        imgLoader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpError,false,0,true);
        imgLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, error, false, 0 ,true);
        imgLoader.load(new URLRequest(path));
        totalImages = 1;
    }

    public function LoadImages(paths:Vector.<String>) {
        totalImages = paths.length;
        for (var i:int = 0; i<paths.length; i++) {
            var imgLoader:flash.display.Loader = new flash.display.Loader();
            imgLoader.contentLoaderInfo.addEventListener(LoaderEvent.COMPLETE, loadImageComplete);
            imgLoader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpError,false,0,true);
            imgLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, error, false, 0 ,true);
            imgLoader.load(new URLRequest(paths[i]));
        }
    }

    private function loadImageComplete(e:Event) {
        returnImages.push(e.target.content);
        if (returnImages.length == totalImages) {
            dispatchEvent(new LoaderEvent(LoaderEvent.ALL_IMAGES_LOADED,0,totalImages,true));
        } else {
            dispatchEvent(new LoaderEvent(LoaderEvent.IMAGE_LOADED,returnImages.length,totalImages,true));
        }
    }

    private function error(e:IOErrorEvent) {
        dispatchEvent(new LoaderEvent(LoaderEvent.ERROR,0,0,e.text,true));
    }

    private function httpError(e:HTTPStatusEvent) {
        if (e.status != 200) {
            dispatchEvent(new LoaderEvent(LoaderEvent.ERROR,0,0,e.status,true));
        }
    }



}

}

And this is how it’s loaded:

var lo:com.loading.Loader = new com.loading.Loader();
lo.LoadImage("http://s3files.core77.com/blog/images/Balloon-Tank.jpg");
lo.addEventListener(LoaderEvent.ERROR, error, false, 0 ,true);
lo.addEventListener(LoaderEvent.ALL_IMAGES_LOADED,loadImage, false, 0, true);
function loadImage(e:LoaderEvent) {
for (var i:int =0; i<e.totalPosition; i++) {
    info.appendText("Loaded Image: " + i+"\n");
    try {
        var tempBitmap:Bitmap = lo.returnImages[i];
        tempBitmap.scaleX = tempBitmap.scaleY = 2;
        tempBitmap.alpha = 0.5;
        addChild(tempBitmap);
    } catch (error:Error) {
        info.appendText("Catched Error: " + error.toString() + "\n");
    }
}
}

function error(e:LoaderEvent) {
info.appendText("Error: " + e.currentString+"\n");
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:04:41+00:00Added an answer on June 9, 2026 at 1:04 am

    I think you’re encountering a cross domain issue when you create a new Bitmap from the loaded image and attempt to manipulate its scale and alpha properties. The quick fix would be to load your test image from the same server from which the SWF is hosted.

    If you’re interested in cross domain policies as they relate to Flash, you should read the (rather esoteric) Adobe documentation, in particular the section titled “Traversing the Display List”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a flash application, which loads a file from a server, and stores
I have this map I'm creating in Flash. You click on a state, then
I have been creating a Flash file where more than one MovieClip can be
Im creating a game in Flash and I have a class that have some
I have seen tutorials on creating a 3d character in flash. Is there a
I'm creating a flash rhythm game. I have a looping (at a certain frame
I am creating a little flash game for the facebook platform, but I am
DTD flash flex action script open source engine? I need some open source engine
Im creating flash game that have the functionality to capture/record its gameplay that can
I have a website that I am creating in Flash CS5. There are several

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.