/ Published in: ActionScript 3
URL: http://flexcomps.wordpress.com/2008/09/01/as3-calling-myfunction-on-main-timeline-from-loaded-swf/
I believe there are more elegant ways of doing this, but this does work for referencing a function on the main timeline of a shell/parent movieclip by a loaded, child movieclip. This would be useful particularly when you have a separate navigation SWF that is loaded into a shell/holder.
Expand |
Embed | Plain Text
// adjust "this.parent.parent" as needed if(this.parent.parent != null){ var parentObj:Object = this.parent.parent as Object; parentObj.traceMe() } // in your parent SWF you will want, of course, a function like this: // function traceMe():void // { // trace("success"); // }
You need to login to post a comment.
