[HTML5] Problem with spritemaps out of the screen

Since i updated my openfl to +3.0 and lime to +2.4.2 (including the latest: openfl 3.1.4 & lime 2.5.0)
there are errors with HTML5: If you locate any spritemap in

x>=stageWidth
or
y=> stageHeight

you get the error:

this happen in firefox…

Would you mind sharing some sample code that we can use to reproduce the problem?

If i create an empty project with 800x450 widthxheight
and create a spritemap located at x=801, i get the error in firefox/html5
Code:
mySpritemap.x=801; //error

Code:
mySpritemap.x=799; //no problem

Do you mean, like this?

var sprite = new Sprite ();
sprite.x = 801;
addChild ();

Or is there a library or some other rendering code you are using from somewhere?

I’m using haxepunk, but the error came after updating to the latest lime/openfl
without changing anything in the preious code

(I was informed to try newer Lime, haven’t yet, will report back. Here’s what I ran into before.)

Same here, a HaxePunk game that works fine w/ no errors other than on Firefox.

I am getting an “IndexSizeError:
Index or size is negative or greater than the allowed amount” at lime_graphics_utils_ImageCanvasUtil.copyPixels(). I am trying to figure out which variable is considered bad, but haven’t figured it out yet. I tried the same webapp on Firefox 39 and Chromium 43.0.2357.130, both on Ubuntu Linux 14.04 x86; OpenFL 3.1.2, Lime 2.4.8. With Chromium, all the graphics appear (it is a HaxePunk game) and there are no errors in the JavaScript console. With FF, the background appears but the sprites do not, and I get that error above on every frame. Oddly enough the stack trace shows it is trying to update the tilemap background, not a sprite, afacit.

I upgraded Lime to 2.5.1 from 2.4.8 and also OpenFL from 3.1.2 to 3.2.0. I no longer get the error from FireFox. But now the game draws even less in both Chromium and Firefox. The background tilemap doesn’t appear, the sprites don’t appear. Some of the Text appears on FF but not on C. So unfortunately I think things got worse overall. (Web is not my main target in the long run, but it is the easiest way to show things to other people for simple feedback.)

So no errors appear in the FF log. But in C whereas before there were no errors logged, now I am getting 2 messages:

(1) ‘CanvasRenderingContext2D.webkitImageSmoothingEnabled’ is deprecated. Please use ‘CanvasRenderingContext2D.imageSmoothingEnabled’ instead.
Main.js:20219 Uncaught SecurityError: Failed to execute ‘getImageData’ on ‘CanvasRenderingContext2D’: The canvas has been tainted by cross-origin data.

(2) Uncaught SecurityError: Failed to execute ‘getImageData’ on ‘CanvasRenderingContext2D’: The canvas has been tainted by cross-origin data.

let me know if you need more source code to hunt it down, thank you for looking at it.

I was informed that ibilon found the error and it will be fixed on the next lime update (2.5.2)
regards

Thanks! I guess I didn’t know what version # would have the fix(es). :slight_smile: