Is there a way to load code stored in an external .js file by another .js file? For example, in Flash I had 2 swf files, loader.swf and game.swf. loader.swf would load game.swf inside itself by means of the Loader and URLRequest classes and then would create and attach to stage instances of classes implemented in game.swf.
Are there ways to recreate a similar approach in OpenFL when targeting HTML5?
I believe that
removeChild first because the
stage reference probably is not expecting to be moved from one
stage to another.
OpenFL on Flash Player uses a preloader that loads in advance of the rest of the game code. HTML5 (currently) loads all game code, then uses a preloader to load any other file assets.
What would happen, @singmajesty, if you compile to swf and then prep it as an asset using
openfl process game.swf? Does any code get stripped out?
openfl process will attempt to extract bitmaps, movie clips, shapes and buttons. It has a basic ActionScript interpreter