Created
October 4, 2010 20:03
-
-
Save saumya/610325 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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