Issues with Importing OpenFL Modules

I have been trying to use the Tile and Tilemap classes that OpenFL has to offer, and for some reason, my project is having trouble importing them and everything else that I need.

These are my statements:

import openfl.display.Bitmap;
import openfl.display.Sprite;
import flash.events.Event;
import flash.Lib;
import openfl.Assets;
import openfl.display.Tile;
import openfl.display.Tilemap;

I made sure that the project was in fact an OpenFL project, I looked through application.xml and project.xml, and I tried putting my code into a proven-to-work project. None of them imported anything.

Another strange thing is that the project targets to Neko, and all of the sudden it is saying that I cannot use flash when targeting for Neko, even though it had been working before with the statements:

import flash.display.Bitmap;
import flash.display.Sprite;
import flash.events.Event;
import flash.Lib;
import openfl.Assets;

I’m not really sure what else I could do.

Thanks for any input.

Try “openfl create SimpleTilemap” or any other of the examples.
Thats an easy way to verify/test openfl installations.

import flash… is for flash.

Not really, the flash package is simply remapped to openfl and should work exactly the same.

1 Like