Posted By

visualadvance on 01/26/10


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


AS3: Checking for Parent SWF and Calling Function

 / Published in: ActionScript 3

This is handy to check if the swf you are working in is loaded into another swf. It also shows how to call a function in the parent swf if it exists.

  1. if (this.parent.parent != null)
  2. {
  3. var parentObj:Object = this.parent.parent as Object;
  4. parentObj.functionName (null);
  5. }

Report this snippet  

You need to login to post a comment.