flixel
flixel copied to clipboard
loadMapFromGraphic Fails On HTML5
- Haxe version: 4.1.5
- Flixel version: ?.?.?
- OpenFL version: ?.?.?
- Lime version: 7.7.0
- Affected target: HTML5
Code snippet reproducing the issue:
package;
import flixel.FlxState;
class PlayState extends FlxState
{
override public function create():Void
{
super.create();
var back = new FlxSprite();
CoolFunctions.playSong('ikachan');
CoolFunctions.fadeShit();
bg = new FlxBackdrop("assets/images/Back.png");
bg.scrollFactor.set(0.75, 0.75);
add(bg);
map.loadMapFromGraphic("assets/images/Map1.png", true, 1, [blank, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t], "assets/images/tileset.png", 16, 16, 0, 1, 0);
map.useScaleHack = false;
add(map);
}
}
Observed behavior:

Expected behavior:

That loadMapFromGraphic() code snippet is not very helpful without the assets it needs to be compiled.