Accessing the parent functions is not as simple as always, I did try using DisplayObject but it didn't work as i thought. The best way really is to rethink the relationship between the child and parent. Normally, if the function exist with the parent as opposed to residing on the child, the function can be as simple as just:
private function changePot(event:MouseEvent):void {
this.parentApplication.changePot((event.currentTarget as Image).name);
}
Of course the parent application needs to have a function call changePot. Thats it!
Sunday, January 31, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment