Skip to main content
Inspiring
October 6, 2006
Question

There is no method with the name 'getNextHighestDepth'.

  • October 6, 2006
  • 5 replies
  • 986 views
I have this code functioning in the first frame of a move but I am now
trying to incorporate it into a class file

I am getting the error "There is no method with the name
'getNextHighestDepth'."
here is my code:
var lvl:Number = 0;
function
createColorClip(MyLblPosition,dsplyColor,dsplyX,dsplyY,dsplyW,dsplyH,ClipName)
{

lvl = this.getNextHighestDepth();
this.createEmptyMovieClip(ClipName, lvl);
same error

this.createEmptyMovieClip(ClipName, this.getNextHighestDepth(););
....
I have read that I need to import mx.core.UIObjects but this class already
extends another class and simply including the UIObjects is not enough .
any Ideas?


This topic has been closed for replies.

5 replies

Inspiring
October 6, 2006
thank you .. it was looking me right in the face the whole time.. I needed
to reference instanceclip rather then this..



"LuigiL" <webforumsuser@macromedia.com> wrote in message
news:eg6ftb$o5s$1@forums.macromedia.com...
> Apparantly the keyword this in this.getNextHighestDepth() is not pointing
> to a movieclip but to the current class which probably doesn't have a
> member called getNextHighestDepth();


Inspiring
October 6, 2006
Yes,

I create movie clips to define many objects on the stage and this particular
class build movie clips in a specific order to paint a graph dynamically.

I am looping through an array to build movie clips on the stage; specifying
color, X,Y,W,H then I am redrawing certain clips based on a data feed.
that's all worked out but my issue now my reference to this is failing
because it is not available in the class.


"poisoniver" <webforumsuser@macromedia.com> wrote in message
news:eg6gcr$on5$1@forums.macromedia.com...
> Is your class extending MovieClip?


Inspiring
October 6, 2006
ok .. I changed it too _root.

errros are gone (thank you)

but Now my clips if they are being created are below other clips. I was
hoping that this would help to reference the next highest level from the
current build and not reference back to the root.




"LuigiL" <webforumsuser@macromedia.com> wrote in message
news:eg6ftb$o5s$1@forums.macromedia.com...
> Apparantly the keyword this in this.getNextHighestDepth() is not pointing
> to a movieclip but to the current class which probably doesn't have a
> member called getNextHighestDepth();


Inspiring
October 6, 2006
How are you creating the clips? Don't you want to reference _level0 instead of _root?
Inspiring
October 6, 2006
Well, if it works, it works. Still, it doesn't sound right. If you are extending the movieclip class you should 'connect' the class to a movieclip in your library using the linkage identifier. Then the keyword this is appropriate and will work. Or, you are building a component...
October 6, 2006
Is your class extending MovieClip?
Inspiring
October 6, 2006
Apparantly the keyword this in this.getNextHighestDepth() is not pointing to a movieclip but to the current class which probably doesn't have a member called getNextHighestDepth();