calling a function of a parent??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • activa
    New Member
    • Mar 2008
    • 2

    calling a function of a parent??

    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.somefunc tion (someObject);

    but AS3 gives me the error:

    ReferenceError: Error #1069: Property somefunction not found on flash.display.S tage 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?
  • nomad
    Recognized Expert Contributor
    • Mar 2007
    • 664

    #2
    Originally posted by activa
    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.somefunc tion (someObject);

    but AS3 gives me the error:

    ReferenceError: Error #1069: Property somefunction not found on flash.display.S tage 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?

    Can you please show us what you have for a parent function.
    Its much like a child but I think you use the function this.goto(do something)

    damon

    Comment

    Working...