View Single Post
  #2 (permalink)  
Old 04-10-2005, 03:52 PM
SWFKit SWFKit is offline
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default 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;
}
}
Reply With Quote