Skip to content

Instantly share code, notes, and snippets.

@saumya
Created October 4, 2010 20:03
Show Gist options
  • Save saumya/610325 to your computer and use it in GitHub Desktop.
Save saumya/610325 to your computer and use it in GitHub Desktop.
package
{
import com.saumya.study.MyProxyObject;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.utils.Proxy;
import flash.utils.flash_proxy;
/**
*
* @author saumya
* @version 0.0.1
*/
public class Main extends Sprite
{
public function Main():void
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
this.initApp();
}
private function initApp():void
{
var mp:MyProxyObject = new MyProxyObject();
mp.age = -5;
mp.drink('ThumsUp');
trace('Main : mp.age :', mp.age);
trace('Main : mp.age :', mp.age());
//
trace('Main : mp.drink :', mp.drink());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment