Project files

Any external files can also be imported to your project via the Project Bar. This is useful for including any other resources your project might need, such as videos, additional images, JSON data, XML data, text data, documents, or other general files you might need in your project. Often project files are requested in events with the AJAX object, allowing data files to be read by the game.

Project files (excluding sounds and music) can be categorised in to folders for Videos, Fonts, Icons (see Icons & splash) and Files (for anything that does not belong to one of the other folders). Files can be imported by right-clicking one of the folders in the Project Bar and selecting the Import option. Note importing files copies them to the project.

Previewing files

Several kinds of files can be previewed simply by double-clicking their item in the Project Bar:

  • Like sounds and music, previewing a video file will play it in a video player.
  • Fonts preview in a dialog showing some sample text using the font.
  • SVG images are previewed in a resizable dialog that displays the image.
  • Other images than SVG can be opened in the Animations Editor for viewing and editing. This is particularly useful with icon files.
  • Array, dictionary and text-based files can be viewed and edited in the Array editor, Dictionary editor and Text editor respectively Paid plans only.

Using Web Fonts

You can use any web font (.woff or .woff2) files imported to the Fonts folder in Text objects. For more information see the section on Using web fonts in the Text object.

Adding new files

Paid plans only When right-clicking the general-purpose Files folder, there is also a New submenu which provides a range of common kinds of file that you might want to add to the project.

Adding a new project fileAdding a new project file

Adding an Array adds a JSON file in a format that can be loaded by the Array object, and opens the Array editor. Adding a Dictionary adds a JSON file that can be loaded by the Dictionary object, and opens the Dictionary editor. Each allows the data in the files to be edited in a visual editor. The other files open a Text editor for editing the contents of the file. Once added, double-click the file in the Project Bar to re-open its editor.

MIME types

When publishing to the web, you must ensure the server hosting the project has the correct MIME types set up for all the kinds of project file you use. Otherwise some project files may fail to load, or could be loaded with corrupted data.

Construct 3 Manual 2020-06-18