HaxeFlixel / flixel

Free, cross-platform 2D game engine powered by Haxe and OpenFL
https://haxeflixel.com/
MIT License
1.98k stars 439 forks source link

Flash test displays blank if an image is on the assets folder (Mac crashes) #251

Closed ricardojmendez closed 11 years ago

ricardojmendez commented 11 years ago

If the attached image is on a test project's assets folder, running nme test flash will only display a blank window. Nothing else happens. Mac targets run as expected if I don't attempt to display it, but if I do they crash almost as soon they start running.

Shark_Bite

ricardojmendez commented 11 years ago

Cropping and rescaling the image to a smaller size makes no difference.

Shark_Bite

Beeblerox commented 11 years ago

@ricardojmendez please, provide some code that you're using to load this image and display it. Here is my test code (and it works for me):

var testSpr:FlxSprite = new FlxSprite(0, 0).loadGraphic('assets/shark_sheet.png', true, true, 160, 113);
testSpr.addAnimation("attack", [0, 1, 2, 3], 12, true);
testSpr.play("attack");
add(testSpr);

plus I've edited your image (changed the size, all frames have equal width, and image is 32-bit png): shark_sheet

ricardojmendez commented 11 years ago

Hi Zaphod, I'll send you an attachment. The flash target displays blank for me even if I don't reference the original sprite in code at all, just its being in the assets folder causes some issue.

varomix commented 11 years ago

sounds like a nmml file issue, can't tell without details or code :)

Beeblerox commented 11 years ago

@ricardojmendez ok, i will wait for your test project

ricardojmendez commented 11 years ago

Everything works on a clean sample project after pulling the latest dev branch. Closing issue, thanks.