Ejemplo n.º 1
0
def abc_(i):
    abc = AbcFile()
    gen = abc.create_generator(False)
    for j in xrange(3):
        script_(gen, "ABC%d__Script%d" % (i, j))
    gen.finish()
    return abc
Ejemplo n.º 2
0
def abc_(i):
    abc = AbcFile()
    gen = abc.create_generator(False)
    for j in xrange(3):
        script_(gen, "ABC%d__Script%d" % (i, j))
    gen.finish()
    return abc
Ejemplo n.º 3
0
swf.add_tag(tags.FileAttributes())
swf.add_tag(tags.EnableDebugger2())
swf.add_tag(tags.SetBackgroundColor(0x333333))
swf.add_tag(tags.DefineEditText(Rect(0, 0, 600, 400), "bb", "Testing script order.", color=RGBA(0xFFFFFF)))
swf.add_tag(tags.PlaceObject2(1, 0))

abc = abc_(1)
swf.add_tag(tags.DoABC("ABC1", abc))

abc = abc_(2)
swf.add_tag(tags.DoABC("ABC2", abc, flags=1))

abc = abc_(3)
swf.add_tag(tags.DoABCDefine(abc))

abc = AbcFile()
gen = abc.create_generator(False)
gen.context.new_script()
with gen.Class("Main", packagedQName("flash.display", "Sprite")):
    with gen.Constructor():
        print_(gen, "Main Constructor")
        gen.load("ABC0__Script0")

gen.finish()
swf.add_tag(tags.DoABC("Main", abc))
swf.add_tag(tags.SymbolClass({0:"Main"}))
swf.add_tag(tags.ShowFrame())
swf.add_tag(tags.End())

f = open("script_order.swf", "wb")
f.write(swf.serialize())
Ejemplo n.º 4
0
    tags.DefineEditText(Rect(0, 0, 600, 400),
                        "bb",
                        "Testing script order.",
                        color=RGBA(0xFFFFFF)))
swf.add_tag(tags.PlaceObject2(1, 0))

abc = abc_(1)
swf.add_tag(tags.DoABC("ABC1", abc))

abc = abc_(2)
swf.add_tag(tags.DoABC("ABC2", abc, flags=1))

abc = abc_(3)
swf.add_tag(tags.DoABCDefine(abc))

abc = AbcFile()
gen = abc.create_generator(False)
gen.context.new_script()
with gen.Class("Main", packagedQName("flash.display", "Sprite")):
    with gen.Constructor():
        print_(gen, "Main Constructor")
        gen.load("ABC0__Script0")

gen.finish()
swf.add_tag(tags.DoABC("Main", abc))
swf.add_tag(tags.SymbolClass({0: "Main"}))
swf.add_tag(tags.ShowFrame())
swf.add_tag(tags.End())

f = open("script_order.swf", "wb")
f.write(swf.serialize())
Ejemplo n.º 5
0
from mech.fusion.avm2.abc_ import AbcFile
from mech.fusion.avm2.instructions import pushbyte

abc = AbcFile()
gen = abc.create_generator()
gen.script0.make_init()
gen.I(pushbyte(255))
abc.serialize()
gen.finish()

f = open("pushbyte.abc", "wb")
f.write(abc.serialize())
f.close()