views:

16

answers:

1

Hi. I've been told that there is a gaming site that you just need to upload your flash game and it automatically detects scoring and adds the scores to an online highscore table.

is it possible?

can i somehow using javascript or a 2nd flash file to load a flash and to debug all of it's variables without having the source?

I assume that if i can debug loaded fla using adobe flash, i will be able to debug it if i still have the source. but if i only have the swf itself, it is possible ?

thanks

+1  A: 

You can use flash.utils.describeType to get a description of a class, e.g.

var aClass:TestClass = new TestClass();
trace(describeType(aClass));
/* 
Traces the following:
<type name="TestClass" base="Object" isDynamic="false" isFinal="false" isStatic="false">
    <extendsClass type="Object"/>
    <variable name="A" type="String"/>
</type>
*/

This is the only way I know of of doing easy reflection in AS3. Some restrictions, however:

  • Does not list private members
  • Does not let you examine variables on the stack
  • Does not give you access to frame code

Note that I said easy above. There has been some interesting work in emulating/decompiling SWFs into Javascript; you might want to check it out.

Ender
If i understand correctly you explained how to describe a class in the currently running swf. i want to be able to monitor a different swf file.
ufk
You can write a SWF that loads other SWFs, and then examines them.
Ender