Tuesday, March 17, 2009

AS3 : accessing Document Class methods / function from a child class

okay this maybe a little old but i figured someone might find it useful.

actually this way of coding does not parallel with the true OOP ways of doing thing ,
because a CHILD should never ask a PARENT to do stuffs, it's always should be the other way round. the best workaround is to use event dispatching and listening between the child and parent to let the parent know what's happening inside the child.

but , if you were stuck or you don't want to lose more of your hair, you can do this to access the Document Class.

var _deeproot:MovieClip = stage.getChildAt(0) as MovieClip;
_deeproot.someMethod(); // access someMethod method
_deeproot.myVar = "foo"; // access and set
public var myVar to "foo"



Thursday, March 12, 2009

fans of amois , report in !


Check this link out. It's been forwarded by 3 guys from my office , one after another.
If you are guessing what's inside the link , here's a teaser.

hello world , after almost a year.

oh ! i forgot that actually i do have a blogger account. pity me.
it's a long time and azfa is the one who remind that i do own one.

lots had happen along the stretch ; mostly about my first job in an international agency
[ ogilvyOne worldwide ] and my pathetic attemp to balance between just that , and my life ;
if i do still have one.


how bout yours?