FlashTest
There appears to be a problem loading a runtime shared library into an swf using Flash MX 2004. The following test path explores it.
The library to be imported is symbols_lib.swf, and is embedded ok.
Runtime Library symbols_lib.swf |
Current configuration does not allow embedding of the file symbols_lib.swf because of its mimetype application/x-shockwave-flash.: symbols_lib.swf |
The importer does not load the library elements, although the message shows that the importer is being embedded. It is possible to view it by clicking on square_5_imp_mm.swf.
Importer square_5_imp_mm.swf |
Current configuration does not allow embedding of the file square_5_imp_mm.swf because of its mimetype application/x-shockwave-flash.: square_5_imp_mm.swf |
To illustrate that this is not an isolated case the same happens with, symbols_lib_imp_mm.swf.
Importer symbols_lib_imp_mm.swf |
Current configuration does not allow embedding of the file symbols_lib_imp_mm.swf because of its mimetype application/x-shockwave-flash.: symbols_lib_imp_mm.swf |
- Both of the importers use a url of the form
http://moinmoin.wikiwikiweb.de/BrianMcEnery/FlashTest?action=AttachFile&do=get&target=symbols_lib.swf |
and I am wondering does this compromise security in some way, and is that why the EmbedObject macro has a problem. I do not know exactly how this url is used, as it is buried in the authoring system. I have already used this to load one swf into another and it works ok.
In the following, yc_source.swf is loaded into yc_get_loader.swf.
Loader yc_get_loader.swf |
Current configuration does not allow embedding of the file yc_get_loader.swf because of its mimetype application/x-shockwave-flash.: yc_get_loader.swf |
- The essential AS code is
1 // clip to load 2 var clipUrl = "yc_source.swf"; 3 var myGet = "?action=AttachFile&do=get&target=" 4 var myUrl = this._url; 5 var index = myUrl.indexOf(myGet, 0); 6 // index = -1 if not in MoinMoin 7 if (index>=0) { 8 clipUrl = myUrl.slice(0, index)+myGet+clipUrl; 9 } 10 this.createEmptyMovieClip("clip_source_mc", this.getNextHighestDepth()); 11 clip_source_mc.loadMovie(clipUrl);
The fact that the swf's load correctly through the AttachFile action http://moinmoin.wikiwikiweb.de/BrianMcEnery/FlashTest?action=AttachFile&do=get&target=square_5_imp_mm.swf, suggests that there may be a glitch in the way the EmbedObject macro loads the swf.
Any suggestions more than welcome