calling a function of a parent??

  • activa
  • Born
  • Born
  • No Avatar
  • Joined: Mar 06, 2008
  • Posts: 2
  • Status: Offline

Post March 6th, 2008, 3:12 pm

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?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 6th, 2008, 3:12 pm

  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Joined: Sep 22, 2003
  • Posts: 6128
  • Loc: Seattle, WA
  • Status: Offline

Post March 6th, 2008, 3:14 pm

Instead of parent, try owner.
The Beer Monocle. Classy.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 31 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.