Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ::CLASS_NAME:: extends MovieClip { // exactly the same as before
- public function new () {
- // This is the same as earlier
- if (!SWF.instances.exists ("::SWF_ID::")) {
- SWF.instances.set ("::SWF_ID::", new SWF (Assets.getBytes ("::SWF_ID::")));
- }
- var swf = SWF.instances.get ("::SWF_ID::");
- var symbol = swf.data.getCharacter (::SYMBOL_ID::);
- super (cast symbol);
- }
- // Now here's where the frameScript map population would happen. All the code below is
- // generated by the openfl flash plugin
- // frames 1, 17 and 29 are random values. Real values would be determined by the openfl
- // flash plugin based on which frames actually have code on them
- frameScripts.set(1, function():void {
- // The code inside the anonymous function is literally a copied string of text that was
- // in the frame inside Flash Professional. I think that the string of the frame's content
- // can be gotten by the getScript() function in the SDK.
- stop();
- } );
- frameScripts.set(17, function():void {
- // Maybe this frame has some different code
- goToAndStop(1);
- } );
- frameScripts.set(29, function():void {
- // Maybe this frame has some haxe code that isn't valid actionscript code
- if(FileSystem.exists("myDir") == false) {
- FileSystem.createDirectory("myDir");
- }
- } );
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement