code:
// Generated by typings
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/8b00a90f22101947c2feaed9afea3d1bd3bbdf0c/tinycolor2/index.d.ts
declare var tinycolor: tinycolor;

interface tinycolor {

    /**
     * Create a tinycolor instance of the color named.
     *
     * @param color - the color as a string to create an instance for.
     */
    (color: string): tinycolorInstance;

    /**
     * Create a tinycolor instance with the given RGB values.
     *
     * @param color - the rgb values to apply to the new instance.
     */
    (color: ColorFormats.RGB): tinycolorInstance;

    /**
     * Create a tinycolor instance with the given RGBA values.
     *
     * @param color - the rgba values to apply to the new instance.
     */
    (color: ColorFormats.RGBA): tinycolorInstance;

    /**
     * Create a tinycolor instance with the given HSL values.
     *
     * @param color - the hsl values to apply to the new instance.
     */
    (color: ColorFormats.HSL): tinycolorInstance;

    /**
     * Create a tinycolor instance with the given HSLA values.
     *
     * @param color - the hsla values to apply to the new instance.
     */
    (color: ColorFormats.HSLA): tinycolorInstance;

    /**
     * Create a tinycolor instance with the given HSV values.
     *
     * @param color - the hsv values to apply to the new instance.
     */
    (color: ColorFormats.HSV): tinycolorInstance;

    /**
     * Create a tinycolor instance with the given HSVA values.
     *
     * @param color - the hsva values to apply to the new instance.
     */
    (color: ColorFormats.HSVA): tinycolorInstance;

    /**
     * Create a tinycolor instance based off the relative values.
     * Works with any color formats
     *
     * @param ratio - the relative color/hue values to apply to the new instance.
     */
    fromRatio(ratio: any): tinycolorInstance; // any of the interfaces defined in the ColorFormats module.

    /**
     * Compares the two colors and returns the difference between their brightness and color/hue
     *
     * @param firstColor - the first color to be used in the comparison.
     * @param secondColor - the second color to be used in the comparison.
     */
    readability(firstColor: tinycolorInstance, secondColor: tinycolorInstance): Readable.Readable;

    /**
     * Ensure that foreground and background color combinations provide sufficient contrast.
     *
     * @param foreColor - the fore color wanted.
     * @param backCOlor - the back color wanted.
     */
    isReadable(foreColor: tinycolorInstance, backColor: tinycolorInstance): boolean;

    /**
     * Given a base color and a list of possible foreground or background colors for that base,
     *  returns the most readable color.
     *
     * @param color - the base color.
     * @param colorsToCompare - array of colors to pick the most readable one from.
     */
    mostReadable(color: tinycolorInstance, colorsToCompare: tinycolorInstance[]): tinycolorInstance;

    /**/
    mix(color1: tinycolorInstance, color2: tinycolorInstance, amount?: number): tinycolorInstance;

    /**
     * Returns a random color
     */
    random(): tinycolorInstance;

    /**
     * key: hex value
     * value: string name ex. hexnames["f00"] --> "red"
     */
    hexNames: { [key: string]: string };

    /**
     * key: 'real' color name
     * value: hex value ex. names["red"] --> "f00"
     */
    names: { [key: string]: string };
}

interface tinycolorInstance {

    /**
     * Return an indication whether the color was successfully parsed.
     */
    isValid(): boolean;

    /**
     * Return an indication whether the color's perceived brightness is light.
     */
    isLight(): boolean;

    /**
     * Return an indication whether the color's perceived brightness is dark.
     */
    isDark(): boolean;

    /**
     * Returns the format used to create the tinycolor instance.
     */
    getFormat(): string;

    /**
     * Returns the input passed into the constructer used to create the tinycolor instance.
     */
    getOriginalInput(): any; // any of the interfaces in ColorFormats or a string

    /**
     * Returns the alpha value of the color
     */
    getAlpha(): number;

    /**
     * Returns the perceived brightness of the color, from 0-255.
     */
    getBrightness(): number;

    /**
     * Sets the alpha value on the current color.
     *
     * @param alpha - The new alpha value. The accepted range is 0-1.
     */
    setAlpha(alpha: number): tinycolorInstance;

    /**
     * Returns the object as a HSVA object.
     */
    toHsv(): ColorFormats.HSVA;

    /**
     * Returns the hsva values interpolated into a string with the following format:
     * "hsva(xxx, xxx, xxx, xx)".
     */
    toHsvString(): string;

    /**
     * Returns the object as a HSLA object.
     */
    toHsl(): ColorFormats.HSLA;

    /**
     * Returns the hsla values interpolated into a string with the following format:
     * "hsla(xxx, xxx, xxx, xx)".
     */
    toHslString(): string;

    /**
     * Returns the hex value of the color.
     */
    toHex(): string;

    /**
     * Returns the hex value of the color -with a # appened.
     */
    toHexString(): string;

    /**
     * Returns the hex 8 value of the color.
     */
    toHex8(): string;

    /**
     * Returns the hex 8  value of the color -with a # appened.
     */
    toHex8String(): string;

    /**
     * Returns the object as a RGBA object.
     */
    toRgb(): ColorFormats.RGBA;

     /**
     * Returns the RGBA values interpolated into a string with the following format:
     * "RGBA(xxx, xxx, xxx, xx)".
     */
    toRgbString(): string;

    /**
     * Returns the object as a RGBA object.
     */
    toPercentageRgb(): ColorFormats.RGBA;

    /**
     * Returns the RGBA relative values interpolated into a string with the following format:
     * "RGBA(xxx, xxx, xxx, xx)".
     */
    toPercentageRgbString(): string;

    /**
     * The 'real' name of the color -if there is one.
     */
    toName(): string;

    /**
     * Returns the color represented as a Microsoft filter for use in old versions of IE.
     */
    toFilter(): string;

    /**
     * String representation of the color.
     *
     * @param format - The format to be used when displaying the string representation.
     *  The accepted values are: "rgb", "prgb", "hex6", "hex3", "hex8", "name", "hsl", "hsv".
     */
    toString(format?: string): string;

    /**
     * Lighten the color a given amount. Providing 100 will always return white.
     *
     * @param amount - The amount to lighten by. The valid range is 0 to 100.
     *  Default value: 10.
     */
    lighten(amount?: number): tinycolorInstance;

    /**
     * Brighten the color a given amount.
     *
     * @param amount - The amount to brighten by. The valid range is 0 to 100.
     *  Default value: 10.
     */
    brighten(amount?: number): tinycolorInstance;

    /**
     * Darken the color a given amount.
     *  Providing 100 will always return black.
     *
     * @param amount - The amount to darken by. The valid range is 0 to 100.
     *  Default value: 10.
     */
    darken(amount?: number): tinycolorInstance;

    /**
     * Desaturate the color a given amount.
     *  Providing 100 will is the same as calling greyscale.
     *
     * @param amount - The amount to desaturate by. The valid range is 0 to 100.
     *  Default value: 10.
     */
    desaturate(amount?: number): tinycolorInstance;

    /**
     * Saturate the color a given amount.
     *
     * @param amount - The amount to saturate by. The valid range is 0  to 100.
     *  Default value: 10.
     */
    saturate(amount?: number): tinycolorInstance;

    /**
     * Completely desaturates a color into greyscale.
     * Same as calling desaturate(100).
     */
    greyscale(): tinycolorInstance;

    /**
     * Spin the hue a given amount. Calling with 0, 360, or -360 will do nothing.
     *
     * @param amount - The amount to spin by. The valid range is -360 to 360.
     *  Default value: 0.
     */
    spin(amount?: number): tinycolorInstance;

    /**
     * Gets an analogous color scheme based off of the current color.
     *
     * @param results - The amount of results to return.
     *  Default value: 6.
     * @param slices - The amount to slice the input color by.
     *  Default value: 30.
     */
    analogous(results?: number, slices?: number): tinycolorInstance[];

    /**
     * Gets a monochromatic color scheme based off of the current color.
     *
     * @param results - The amount of results to return.
     *  Default value: 6.
     */
    monochromatic(results?: number): tinycolorInstance[];

    /**
     * Gets a split complement color scheme based off of the current color.
     */
    splitcomplement(): tinycolorInstance[];

    /**
     * Gets a triad based off of the current color.
     */
    triad(): tinycolorInstance[];

    /**
     * Gets a tetrad based off of the current color.
     */
    tetrad(): tinycolorInstance[];

    /**
     * Gets the complement of the current color
     */
    complement(): tinycolorInstance;

    /**
     * Gets a new instance with the current color
     */
    clone(): tinycolorInstance;
}

declare namespace Readable {
    interface Readable {
        brightness: number;
        color: number;
    }
}

declare namespace ColorFormats {
    interface RGB {
        r: number;
        g: number;
        b: number;
    }

    interface RGBA extends RGB {
        a: number
    }

    interface HSL {
        h: number;
        s: number;
        l: number;
    }

    interface HSLA extends HSL {
        a: number;
    }

    interface HSV {
        h: number;
        s: number;
        v: number;
    }

    interface HSVA extends HSV {
        a: number;
    }
}

declare module 'tinycolor2' {
    export = tinycolor;
}


code:
/*
 * Created by aimozg on 10.08.2017.
 * Confidential until published on GitHub
 */
///<reference path="typings/jquery.d.ts"/>
type TDrawable = HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap;

function RGBA(i: tinycolorInstance): number {
	let rgb = i.toRgb();
	return (
			   ((rgb.a * 0xff) & 0xff) << 24
			   | (rgb.b & 0xff) << 16
			   | (rgb.g & 0xff) << 8
			   | (rgb.r & 0xff)
		   ) >>> 0;
}

function bound(min:number,x:number,max:number=Infinity):number {
	return min < x ? x < max ? x : max : min;
}

function randint(n: number): number {
	return Math.floor(Math.random() * n);
}

function randel<T>(arr: T[]): T {
	return arr[randint(arr.length)];
}

function $new(selector: string = 'div', ...content: (string | JQuery | Element | JQuery[] | Element[])[]): JQuery {
	let ss      = selector.split(/\./);
	let tagName = ss[0] || 'div';
	let d       = document.createElement(tagName);
	d.className = ss.slice(1).join(' ');
	if (tagName == 'button') (d as HTMLButtonElement).type = 'button';
	if (tagName == 'a') (d as HTMLAnchorElement).href = 'javascript:void(0)';
	let j = $(d);
	for (let c of content) j.append(c);
	return j;
}

type Dict<T> = { [index: string]: T };

function obj2kvpairs<T>(o: Dict<T>): [string, T][] {
	let rslt: [string, T][] = [];
	for (let i = 0, a = Object.keys(o), n = a.length; i < n; i++) {
		rslt[i] = [a[i], o[a[i]]];
	}
	return rslt;
}

function colormap(src: ImageData, map: [number, number][]): ImageData {
	let dst  = new ImageData(src.width, src.height);
	let sarr = new Uint32Array(src.data.buffer);
	let darr = new Uint32Array(dst.data.buffer);
	for (let i = 0, n = darr.length; i < n; i++) {
		darr[i] = sarr[i];
		for (let j = 0, m = map.length; j < m; j++) {
			if (sarr[i] === map[j][0]) {
				darr[i] = map[j][1];
				break;
			}
		}
	}
	return dst;
}

/*
 * Takes a rect starting from (srcdx, srcdy) of size (srcw x srch) from src
 * Scales it `scale` times.
 * Puts in onto dst starting from (dstdx, dstdy), with a dst bounds limited at (dstw x dsth)
 */
function drawImage(src: TDrawable, srcdx: number, srcdy: number, srcw: number, srch: number,
				   dst: CanvasRenderingContext2D, dstdx: number, dstdy: number, dstw: number, dsth: number,
				   scale: number) {
	let sx = srcdx, sy = srcdy, sw = srcw, sh = srch;
	let dx = dstdx, dy = dstdy;
	if (dx < 0) {
		sx -= dx;
		dx = 0;
	}
	if (dy < 0) {
		sy -= dy;
		dy = 0;
	}
	if (dx + sw > dstw) sw = dstw - dx;
	if (dy + sh > dsth) sh = dsth - dy;
	dst.drawImage(src, sx, sy, sw, sh, dx * scale, dy * scale, sw * scale, sh * scale);
}

namespace utils {
	export const basedir                 = window['spred_basedir'] || '../../';
	export const canAjax                 = location.protocol != 'file:';

	namespace FileAsker {
		let fileReaders = {} as Dict<(data: File) => any>;

		export function filename(f: string): string {
			let j = f.lastIndexOf('/');
			if (j >= 0) return f.substring(j + 1);
			return f;
		}

		export function wantFile(f: string) {
			return filename(f) in fileReaders;
		}

		function checkFiles(e: Event) {
			let filesArray = (e.target as HTMLInputElement).files;
			for (let i = 0; i < filesArray.length; i++) {
				let file    = filesArray[i];
				let name    = filename(file.name);
				let handler = fileReaders[name];
				if (handler) {
					delete fileReaders[name];
					handler(file);
				}
			}

		}

		export function askFile(url: string, handler: (File) => any) {
			let fileinput = $new('input').attr('type', 'file').attr('multiple', 'true').change(checkFiles);
			let dropzone  = $new('p',
				'Please select manually the ',
				$new('code', url),
				' file:',
				fileinput);
			$('#LoadingList').append(dropzone);
			$('#Loading').show();
			fileReaders[filename(url)] = (file) => {
				dropzone.remove();
				$('#Loading').toggle($('#LoadingList>*').length > 0);
				handler(file);
			}
		}
	}
	export function url2img(src: string): Promise<HTMLImageElement> {
		return new Promise<HTMLImageElement>((resolve, reject) => {
			let img    = document.createElement('img');
			img.onload = (e) => {
				resolve(img);
			};
			img.src    = src;
		});
	}

	export function loadFile(url: string, format: 'xml'): Promise<XMLDocument>;
	export function loadFile(url: string, format: 'text'): Promise<string>;
	export function loadFile(url: string, format: 'img'): Promise<HTMLImageElement>;
	export function loadFile(url: string, format: string): Promise<any> {

		return new Promise<any>((resolve, reject) => {
			if (!canAjax) {
				FileAsker.askFile(url, file => {
					if (format == 'img') {
						url2img(URL.createObjectURL(file)).then(resolve);
					} else {
						let fr    = new FileReader();
						fr.onload = () => {
							if (format == 'xml') {
								resolve($.parseXML(fr.result as string));
							} else {
								resolve(fr.result);
							}
							return;
						};
						fr.readAsText(file);
					}
				});
			} else if (format != 'img') {
				$.ajax(url, {dataType: format}).then(resolve).fail(reject);
			} else url2img(url).then(resolve);
		});
	}
	export function xmlget(x:Element,query:string):string|undefined {
		let m:string[];
		let orig = query;
		while (query && x) {
			if ((m = query.match(/^ *>? *([\w_-]+) */))) {
				x = Array.from(x.children).find(e => e.tagName.toUpperCase() == m[1].toUpperCase());
				query = query.substring(m[0].length);
			} else if ((m = query.match(/^ *@ *([\w_-]+) *$/))) {
				query = query.substring(m[0].length);
				let a = x.getAttribute(m[1]);
				if (a === null) return undefined;
				return a;
			} else {
				throw 'Bad selector "'+orig+'", halted on "'+query+'"';
			}
		}
		if (!x) return undefined;
		return x.innerHTML;
	}
	export function unindent(s:string|undefined):string|undefined {
		if (s === undefined) return undefined;
		let m = s.match(/^(\n\s+)/);
		if (m) s = s.replace(new RegExp(m[1],'g'),'\n').substr(1);
		s = s.replace(/(\n\s+)$/,'');
		return s;
	}
	export function xmlgeti(x:Element,query:string):number|undefined {
		let s = xmlget(x,query);
		if (s === undefined) return undefined;
		return (+s)|0;
	}
	export function xmlgetf(x:Element,query:string):number|undefined {
		let s = xmlget(x,query);
		if (s === undefined) return undefined;
		return +s;
	}
	export function parseLength(s:string|number):number;
	export function parseLength(s:undefined):undefined;
	export function parseLength(s:string|number|undefined):number|undefined {
		if (typeof s === 'undefined') return undefined;
		if (typeof s === 'number') return s;
		if (!isNaN(+s)) return +s;
		let m: RegExpMatchArray;
		if ((m = s.match(/^(?:(\d+)')(?:(\d+)")?$/))) {
			return (+m[1])*12+ +m[2];
		} else if ((m = s.match(/^(?:(\d+)m)?\s*(?:(\d+)cm)$/))) {
			let cm:number = (+m[1])*100 + +m[2];
			return +(cm/2.54);
		} else {
			throw "Not a valid length: " + JSON.stringify(s);
		}
	}
	export function lengthString(n:number|undefined):string|undefined {
		if (n === undefined) return undefined;
		if (n > -0.05 && n < +0.05) return '0';
		let s = '';
		if (n < 0) {
			s = '-';
			n = -n;
		}
		let ft = (n/12)|0;
		if (ft>0) s += ft+"'";
		let ic = (((n - ft*12)*10)|0)/10;
		if (ic != (ic|0)) s += ic.toFixed(1)+'"';
		else if (ic != 0) s += ic.toFixed(0)+'"';
		return s;
	}
	export function dictLookup(dict:any, s:string|undefined):number|undefined {
		if (typeof s === 'undefined') return undefined;
		if (s in dict) return dict[s];
		if (!isNaN(+s)) return +s;
		throw "Not a valid number or enum constant: "+JSON.stringify(s);
	}
	export function dictLookupName(dict:any, s:number|undefined):string|undefined {
		if (s === undefined) return undefined;
		if (s in dict) return dict[s];
		return ""+s;
	}
	export function enumNames(E:any):string[] {
		return Object.keys(E).filter(k => typeof E[k as any] === "number");
	}
	export function enumValues(E:any):string[] {
		return enumNames(E).map(k => E[k as any]);
	}
	export function enumAsOptions(E:any):HTMLOptionElement[] {
		return enumNames(E).map(k=>
			$('<option>').val(E[k]).html(k)[0] as HTMLOptionElement
		)
	}
}

license: unknown


code:
package coc.test {
	import classes.internals.LoggerFactory;
	import coc.view.MainView;
	import flash.display.MovieClip;
	import mx.logging.ILogger;

	public class TestMainView extends MovieClip {
		private static const LOGGER:ILogger = LoggerFactory.getLogger(TestMainView);
		public var mainView :MainView;

		public function TestMainView() :void {
			// This variable is used to maintain a reference to the Test's
			// this in unbound functions.
			var testThis :TestMainView = this;

			this.mainView = new MainView();
			this.stage.addChild( this.mainView );

			LOGGER.debug( "MainView:", this.mainView );

			this.mainView.selectSprite( 2 );

			// TODO: put in actual callbacks here because that be how we do, now.
			this.mainView.setButton( 0, 'Lol' );
			this.mainView.setButton( 4, 'Poop' );
			this.mainView.setButton( 6, 'Penis' );
			this.mainView.setButton( 9, 'Clear Buttons' );
			this.mainView.setButton( 8, '' );

			LOGGER.debug( "test: hasButton( 'Lol' )?\n\t",
				this.mainView.hasButton( 'Lol' ), "(Should be 'true')" );

			LOGGER.debug( "test: indexOfButtonWithLabel( 'Poop' )?\n\t",
				this.mainView.indexOfButtonWithLabel( 'Poop' ), "(Should be '4')" );

			LOGGER.debug( "test: getButtonText( 6 ) =>\n\t",
				this.mainView.getButtonText( 6 ), "(Should be 'Penis')" );

			LOGGER.debug( "test: buttonTextIsOneOf( 6, [ 'Peepee', 'Dingaling', 'Penis', 'Cock', 'Doodle', 'Dick', 'Sausage' ] )\n\t",
				this.mainView.buttonTextIsOneOf( 6, [ 'Peepee', 'Dingaling', 'Penis', 'Cock', 'Doodle', 'Dick', 'Sausage' ] ),
				"(Should be 'true')" );

			LOGGER.debug( "test: buttonIsVisible( 0 ) =>\n\t",
				this.mainView.buttonIsVisible( 0 ),
				"(Should be 'true')" );

			LOGGER.debug( "test: buttonIsVisible( 8 ) =>\n\t",
				this.mainView.buttonIsVisible( 8 ),
				"(Should be 'false')" );

			LOGGER.debug( "test: menuButtonHasLabel( 'newGame', 'New Game' )?\n\t",
				this.mainView.menuButtonHasLabel( 'newGame', 'New Game' ),
				"(Should be 'true')" );

			function makeButtonTracer( name :String ) :Function {
				return function( event ) {
					LOGGER.debug( "You pressed the", name, "button!" );
				};
			}

			this.mainView.onNewGameClick = makeButtonTracer( "NewGame" );
			this.mainView.onDataClick = makeButtonTracer( "Data" );
			this.mainView.onStatsClick = makeButtonTracer( "Stats" );
			this.mainView.onLevelClick = makeButtonTracer( "Level" );
			this.mainView.onPerksClick = makeButtonTracer( "Perks" );
			this.mainView.onAppearanceClick = makeButtonTracer( "Appearance" );

			this.mainView.setButton( 2, 'Hide Menu' );
			this.mainView.setButton( 3, 'Show Menu' );
		};
	}
}


code:
<application xmlns="http://ns.adobe.com/air/application/30.0">
  <id>com.cochgg</id>
  <versionNumber>2.9.0</versionNumber>
  <filename>Corruption of Champions (HGG Mod)</filename>
  <description>An interactive text-based fantasy RPG intended for adult audiences. (18+)</description>
  <name>Corruption of Champions (HGG Mod)</name>
  <initialWindow>
    <title>Corruption of Champions (HGG Mod)</title>
    <content>CoC-AIR.swf</content>
    <systemChrome>standard</systemChrome>
    <transparent>false</transparent>
    <visible>true</visible>
    <fullScreen>true</fullScreen>
    <autoOrients>true</autoOrients>
    <aspectRatio>any</aspectRatio>
    <renderMode>gpu</renderMode>
  </initialWindow>
  <icon>
    <image29x29>icons/icon_29.png</image29x29>
    <image57x57>icons/icon_57.png</image57x57>
    <image72x72>icons/icon_72.png</image72x72>
    <image144x144>icons/icon_144.png</image144x144>
    <image512x512>icons/icon_512.png</image512x512>
  </icon>
  <customUpdateUI>false</customUpdateUI>
  <allowBrowserInvocation>false</allowBrowserInvocation>
  <android>
    <manifestAdditions><![CDATA[<manifest>
		<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
		<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19"/>
	</manifest>]]></manifestAdditions>
  </android>
</application>