Re:SWFGen: How Do I inject a block of actionscript
Maybe you can do like this:
define a string variable in action script:
var mycode = "$CODE";
eval(mycode);
then you can inject code by modifying the "$CODE" string
swfgen.onSubActionString = function (obj)
{
if (obj.string == "$CODE")
{
obj.string = "function something() {}";
obj.needSub = true;
}
}
|