Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrFuscator
Using a pre-loader with a obfuscated SWF?

Registered User
2011-09-12 12:24:40

My game works great even after obfuscation which makes me want to buy the full version, with the exception of one thing;

It won't work with a pre-loader!

For my games it's really important that a player gets a INSTANT loading-screen (I have zero tolerance for a blank screen even if just for a few seconds), hence I don't even embedd the loading-screen in the main game but rather I have a very simple preloader.swf that simply displays "x%" on a black screen showing how much is left loading,

but the preloader doesn't work after the target SWF has been obfuscated, it gives this error:
"ReferenceError: Error 1069: Property _uh52 not found on fl.rsl.SWZInfo and there is no default value.
at KP4__Preloader__/_dm37()"

The code for my pre-loader is quite simply:
import flash.display.Loader;


var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("game.swf"));

function loop(e: ProgressEvent):void
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString() + "%";

function done(e:Event):void
percent = null;

Registered User
2011-09-12 14:27:05

EDIT: I thought I had gotten it to work, but turns out my solution (of putting lots of SWZInfo-type keywords to the ignore-list) only solved it in Flash IDE-preview but not in standalone-swf or html.

2011-09-12 19:18:04

Hm, just to clarify:

- so you have two separate .swf files, one preloader and the second which is the real .swf.
- The real swf is obfuscatred, the preloader is not.
- The real, obfuscated swf works when started standalone, but not when loaded from the preloader?

This doesn't much sense, maybe I've misunderstood something here. Please correct me where I was wrong. :)

But nice that you made it work now by yourself ;)

Registered User
2011-09-13 10:01:04

@Niko: Nonono I meant I thought I had it working but then I edited it when I found that it was not a proper solution.

Basically what I've found now however is that:
a) Pre-loader (not-obfuscated, using TLF) > Game (not-obfuscated, using TLF) = Works.

b) Pre-loader (not-obfuscated, using TLF) > Game (OBFUSCATED, using TLF) = DOESN'T WORK!

c) Pre-loader (not-obfuscated, using TLF) > Game (OBFUSCATED but with lots and lots of keywords in the ignore-list, using TLF) = HALF works (works in Flash IDE-preview, but not in standalone-SWF or html.

But here's the solution/compromise I've found working:
d) Same as 'b)' but Pre-loader Must NOT use TLF-text, if it does then there seems to be some kind of TLF-text-conflict after the game is obfuscated.

In my case my pre-loader probably doesn't need TLF-text anyway so this comprimise might be ok after all. :)

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "Inter?ational" (you are not logged in)




Possible Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact