0

I have a HTML5 composition using createjs and associated libraries (via Flash CC 2014).

However, sometimes images that are loaded in through the manifest fail to display when the composition is loaded. I have tried making multiple requests for the image file in the manifest but alas, to no avail. I have tried switching to sprite sheets but then sometimes the sprite sheet image itself fails to display!

Does anyone know if anything can be done to stop this happening? I am unable to switch to an alternative framework, has to be createjs.

Thanks in advance.

EDIT: I am instantiating the images as follows:

Image loading in the manifest:

{src: "images/gridBG.png", id:"gridBG"},

The image-specific function as exported from Flash (I have changed the namespace):

(window.namespace1.namespace2.lib.gridBG = function() {
this.initialize(img.gridBG);
}).prototype = p = new cjs.Bitmap();
p.nominalBounds = new cjs.Rectangle(0,0,992,886);

And when I come to use it:

// Layer 4
this.instance_1 = new window.namespace1.namespace2.lib.gridBG();
this.instance_1.setTransform(-339,151.6);

this.timeline.addTween(cjs.Tween.get(this.instance_1).wait(1));

I should reiterate that this is only an intermittent problem and I am unable to reliably replicate it, it just doesn't work sometimes.

  • I haven't seen or heard of this happening before. Can you provide more information? – gskinner Jul 28 '15 at 16:02
  • Sure - what happens is all the images are loaded in the manifest then when added to the stage/instantiated, they simply do not appear. I thought this could be a network error but I have made multiple requests for some images and still they do not appear. – LordMysterious Jul 29 '15 at 08:55
  • Unfortunately I cannot provide screenshots as the content is highly confidential. – LordMysterious Jul 29 '15 at 08:57
  • How are you instantiating the images? If you use a string path on a Bitmap, it will still take a short delay before it is drawn, even when preloaded. If this is directly from the exported Flash CC code, is there a Ticker running? – Lanny Jul 30 '15 at 00:29
  • I have added more content to the OP. – LordMysterious Jul 30 '15 at 21:37
  • Found a solution to this? I noticed that adding a few dummy images at the beginning of manifest stops this, but it is a horrible practice... – FilippoG May 09 '16 at 17:19
  • Yes, I found that setting the preferXHR argument for the LoadQueue to true solved this. – LordMysterious May 09 '16 at 23:00

0 Answers0