1

I have an Away3D(March 2014 version) project that I have moved over to a new server that now stops executing when it hits an attempt to load a jpg into a bitmapMaterial. Here's the method I used:

function loadShelf(pic): void {
    shelfLoader = new Loader();
    shelfLoader.load(new URLRequest(pic));
    shelfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onShelfLoadComplete);
}

function onShelfLoadComplete(event: Event): void {
    GLASS.img.addChild(shelfLoader); //the image loads successfully into a 2D clip
    // the movie halts when it hits shelfMaterial
    shelfMaterial = new BitmapMaterial(Cast.bitmap(event.target.content));

}

This problem does not occur on the original Windows 2003 server, just the new one. Any ideas?

user2016210
  • 119
  • 4
  • 13
  • Crossdomain issue maybe? You can load images from other domains and manipulate the Loader on loading the image, but you cannot perform insecure operations on it (like accessing the content or BitmapData.draw operation). – Organis Apr 03 '17 at 01:12
  • You hit the nail on the head. I still had the old domain name in the image path name. Now how do I give you credit? – user2016210 Apr 03 '17 at 14:34
  • I posted an answer for you to do so. Thanks. – Organis Apr 03 '17 at 15:33

1 Answers1

1

Crossdomain issue maybe? You can load images from other domains and manipulate the Loader on loading the image, but you cannot perform insecure operations on it (like accessing the content or BitmapData.draw operation).

Organis
  • 7,243
  • 2
  • 12
  • 14