calling a function of a parent??

  • activa
  • Born
  • Born
  • activa
  • Posts: 2

Post 3+ Months Ago

I have a function on the main timeline of a movie:

function somefunction (whichObject) {
some action;

My program loads a child swf. In that child swf, I have code to call the function in the parent:

parent.somefunction (someObject);

but AS3 gives me the error:

ReferenceError: Error #1069: Property somefunction not found on flash.display.Stage and there is no default value.
at MethodInfo-7()

It's easy to call functions in children, and I'm sure I've called a parent's function before... what am I missing?
  • spork
  • Brewmaster
  • Silver Member
  • spork
  • Posts: 6296
  • Loc: Seattle, WA

Post 3+ Months Ago

Instead of parent, try owner.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 6 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.