Groups | Blog | Home
all groups > flash (macromedia) > september 2003 >

flash (macromedia) : Any place to hide my Include# .as from a compiler



warren10
9/29/2003 11:15:05 PM
Sorry guys,
This is a tired old question, But I am absolutely blown away at what the product SWF Compiler has done to my code. I have thousands of lines of code (objects, and the driving engine of my app) and even though it is broken up into seperate swfs and seperate "as"es I can get absolutely everything from this tool. It pisses me off. and the code is laid out just like I wrote it indented and code hinted. There has to be some place to hide the as.
My initial plan was to keep the important "as"es off the root of the site and on the server parrallel to the site (out of inquiring hands) but I notice this damn tool seem to grab the whole swf after it compiles and has all my internal "as"es already in it. What the hell is up with that? It takes it from the tool it installs in your browser.
Normally I don't give a damn about protecting some code but this time I have a few months invested in this and was hoping to keep it mine for a few months. But....

Any one have anything new on securing the code. If you have a good idea and don't want to post it ( I presume it may be the way every trick in the book so far has been discovered by the "compiler Dudes") my email is wh@i-magination.net. Otherwise post for all.

I know, There is no way to do it and the compilers have been around since flash5 and they always new and improving. but... what the hell, there may be a genius among us.

Thanks again
Warren.

warren10
9/30/2003 12:32:28 AM
Thanks Urami. Hate waisting anyones time on an old question.

It justs baffles me that the SWF should not have the "as" code in it if it is included as an external file. When they grab the swf out of the temp cache, it should be an empty shell waiting for code to be called in. Now I'm fairly new to using includes (I typically am fine with all my code on the first actionframe) but when I dig in my cache and bust the swf open, all my code is sitting in there. Does that seem odd to you? I'm not talking about a piece of code saying include# "myaction.as", I mean everything that is in the myaction.as is there. I thought an actionscript include would work like say a CF or shtml include where you look at the code and you see the #include (and its address) but not what is in the include.

Any thoughts or insights on that.

Thanks again.
Warren


maular
9/30/2003 3:52:46 AM
Usually a #include is a pre-processor command for the compiler, as such the compiler will compile in the external code as part of the internal. At every #include the entire contents of the external file will be pasted, then the whole lot will be compiled (into a SWF).

I am not sure if this is how it works in Flash, but I see no reason why it wouldn't be. I am not familiar with either CF or shtml, but I understand that both of those will be interpreted rather than compiled, as such any includes are looked at during runtime - there is no compile time. So if you could look at the source in something that does not interpret it (ie a text editor), you will see the #include lines.

The only thing I can think of would be to have some runtime call to load in your external code, but I can't think of how... Perhaps a LoadMovie call to a server side PHP script, which checks if the originating call was from your own domain or not... But then whether your SWF is running in someone's cache or running from their hard drive or through SWF Decompiler is a very small difference, and would be very difficult to detect.

Good Luck!

warren10
9/30/2003 4:08:56 AM
thanks for the response maular.

I appreciate the input.

Warren.

urami_
9/30/2003 7:40:48 AM

[quoted text, click to view]

Nothing you can do .
Why ?
Because the flash player must be able to read the code in order to run your file.
There is an extend to which you can jam the file , rename variable etc... if you mess it
too much it will start to malfunction , therefor all the decompiling tools can read it too. After all SWF is an open format so anyone can do whatever
tools they like whether
it is ethical or not .




Regards

urami_*



<lsym>

There's no place like 127.0.0.1

Jeckyl
9/30/2003 12:18:12 PM
its not external by the time the script is compiled into a SWF file.

Flash Player does not load external .AS files when movie plays .. all the
code is in your SWF files. It is Flash MX 2004 itself that loads in the
external files as part of generating a SWF file .. a little like how you can
import images and they end up in the SWF file etc.

[quoted text, click to view]
is included as an external file. When they grab the swf out of the temp
cache, it should be an empty shell waiting for code to be called in. Now I'm
fairly new to using includes (I typically am fine with all my code on the
first actionframe) but when I dig in my cache and bust the swf open, all my
code is sitting in there. Does that seem odd to you? I'm not talking about a
piece of code saying include# "myaction.as", I mean everything that is in
the myaction.as is there. I thought an actionscript include would work like
say a CF or shtml include where you look at the code and you see the
#include (and its address) but not what is in the include.

AddThis Social Bookmark Button