sorry, this is a repeat thread, but couldn’t change the title on the old one, someone must know the solution to this problem, I just dont think i worded it correctly enough for someone who knew what i was talking about to notice last time.
Ive got a movieclip that creates and adds a child mc then calls a function in the new mc. the function runs, but the local vars for the new mc aren’t visible to the function. Is there a special way to call a function so that its scope is in the child, not in the parent ? ( i assume thats where it is, even though a trace of this returns the correct object type )
ie:
[Parent Clip]
–[child clip: movGraph]
–variable ( var thegraph:MovieClip = this; )
–[function loadMe]
–(trace (theGraph); )
calling movGraph.loadMe spits out undefined or null object error, as opposed to
[object movGraph]
obviously i want to do a whole lot more than trace out the object type, and trace(this) in the function returns [object movGraph]. the variable “theGraph” declared in the child isn’t available or its null somehow.
Can anyone tell me where I’m going wrong ? - any help would be appreciated. at the moment I’m having to add all the code in the function instead of the “root” of the child. which really defeats the point.