/**
 * SyntaxHighlighter
 * http://alexgorbatchev.com/
 *
 * SyntaxHighlighter is donationware. If you are using it, please donate.
 * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
 *
 * @version
 * 2.1.364 (October 15 2009)
 * 
 * @copyright
 * Copyright (C) 2004-2009 Alex Gorbatchev.
 *
 * @license
 * This file is part of SyntaxHighlighter.
 * 
 * SyntaxHighlighter is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * SyntaxHighlighter is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with SyntaxHighlighter.  If not, see <http://www.gnu.org/copyleft/lesser.html>.
 */
SyntaxHighlighter.brushes.AS3 = function()
{
	// Created by Peter Atoria @ http://iAtoria.com
	
	var inits 	 =  ' new public private class interface function package import var if else for void include extends return ';
	
	var keywords =	'-Infinity ...rest Array as AS3 Boolean break case catch const continue SoundTransform getBounds Rectangle cacheAsBitmap mask Math round bytesLoaded bytesTotal album SOUND_COMPLETE floor position Date decodeURI Event XML XMLList Loader target addChild onPress loadMovie MOUSE_UP ROLL_OVER ROLL_OUT ENTER_FRAME getURL navigateToURL _y y _x x ' + 
					'decodeURIComponent default delete do dynamic each encodeURI encodeURIComponent escape NativeDragManager NativeDragEvent ClipboardFormats NATIVE_DRAG_ENTER NATIVE_DRAG_DROP Object clipboard getData FILE_LIST_FORMAT extension acceptDragDrop this play url ' + 
					' DataProvider FileStream display net Form false final finally flash_proxy get implements in Infinity addEventListener MouseEvent _width _height _alpha alpha _yscale scaleY _xscale scaleX stage stageHeight stageWidth setTimeout setSelection split join ' + 
					' TransformGestureEvent displayState GESTURE_ZOOM GESTURE_ROTATE stopImmediatePropagation random rotation StageDisplayState FULL_SCREEN_INTERACTIVE int request text URLVariables URLRequest URLLoader MovieClip instanceof internal is isFinite isNaN browseForSave pop nativePath separator FileMode writeUTFBytes open close push value containers ignoreWhitespace endFill source loaderInfo gotoAndPlay gotoAndStop event currentTarget UILoader transitions WRITE isXMLName label namespace NaN native null MOUSE_DOWN CLICK MOUSE_OVER MOUSE_OUT buttonMode stop startDrag stopDrag mouseEnabled soundTransform flash desktop NativeApplication events stage nativeWindow startMove minimize nativeApplication exit mouseX stopAll indexOf info duration substring lastIndexOf ' + 
					' Null Number length Object object_proxy override parseFloat parseInt protected Sprite html HTMLLoader width height scaleMode StageScaleMode NO_SCALE align StageAlign TOP_LEFT KeyboardEvent KEY_DOWN location visible ' + 
					' set static String super switch this throw true try typeof uint undefined unescape historyBack historyForward cancelLoad reload charCode Keyboard ENTER graphics clear lineStyle beginFill drawRect readFloat ' + 
					' fl video VideoEvent MetadataEvent filesystem FileFilter File getVideoPlayer activeVideoPlayerIndex smoothing seekBar volumeBar name METADATA_RECEIVED browseForOpen SELECT desktopDirectory use while with trace method URLRequestMethod POST COMPLETE IOErrorEvent IO_ERROR data load removeEventListener media Sound SoundChannel SoundMixer utils ByteArray Timer TimerEvent TIMER start computeSpectrum '
					;
	
	this.regexList = [
		{ regex: SyntaxHighlighter.regexLib.singleLineCComments,	css: 'comments' },		// one line comments
		{ regex: SyntaxHighlighter.regexLib.multiLineCComments,		css: 'comments' },		// multiline comments
		{ regex: SyntaxHighlighter.regexLib.doubleQuotedString,		css: 'value' },		// double quoted strings
		{ regex: SyntaxHighlighter.regexLib.singleQuotedString,		css: 'string' },		// single quoted strings
		//{ regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi,				css: 'value' },			// numbers
		{ regex: new RegExp(this.getKeywords(inits), 'gm'),			css: 'color3' },		// initializations
		{ regex: new RegExp(this.getKeywords(keywords), 'gm'),		css: 'keyword' }		// keywords
		//{ regex: new RegExp('var', 'gm'),							css: 'variable' },		// variable
		//{ regex: new RegExp('trace', 'gm'),							css: 'color1' }			// trace
		];
	
	this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
};

SyntaxHighlighter.brushes.AS3.prototype	= new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.AS3.aliases	= ['actionscript3', 'as3'];

