In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

Overload ??

Get Adobe Flash player
by beinteractive 01 Apr 2010

    Talk

    883108 at 01 Apr 2010 07:44
    なるほど。うまいですねー
    imajuk at 01 Apr 2010 16:07
    うう。罪作りな。一瞬本気で喜びました。
    nbr at 02 Apr 2010 10:41
    ハイライトなかったら・・・
    leichtgewicht at 03 Apr 2010 23:54
    hihi, good joke! :)

    Tags

    Embed
/**
 * Copyright beinteractive ( http://wonderfl.net/user/beinteractive )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/weP1
 */

package
{
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;
	
	public class Overload extends Sprite
	{
		public function Overload()
		{
			_field = new TextField();
			_field.autoSize = TextFieldAutoSize.LEFT;
			_field.defaultTextFormat = new TextFormat('Verdana', 10, 0x000000);
			addChild(_field);
			
			// Overload!?
			test('Hoge', 'Fuga');
			test(4, 1);
		}
		
		public static var _field:TextField;
		
		privte function test(s1:String, s2:String):void
		{
			_field.appendText('String: ' + s1 + ', ' + s2 + '\n');
		}
		
		priate function test(n1:Number, n2:Number):void
		{
			_field.appendText('Number: ' + n1 + ', ' + n2 + '\n');
		}
	}
}



























































































































































































internal namespace privte;
internal namespace priate;

internal function test(...args):void
{
	var prefix:String = '';
	if (args[0] is String) {
		prefix = 'String: ';
	}
	else {
		prefix = 'Number: ';
	}
	Overload._field.appendText(prefix + args.join(', ') + '\n');
}