Skip to main content
Participant
June 23, 2006
Question

movieclip setMask problem

  • June 23, 2006
  • 1 reply
  • 297 views
Can anybody explain me when I use a variable string as movieclipname to mask It won't work?

Doesn't work:

var eraserId = "test"
this.attachMovie("eraser",eraserId,this.getNextHighestDepth(), {_x:_xmouse, _y:_ymouse});
this.setMask(eraserId);

Does work:

this.attachMovie("eraser","test",this.getNextHighestDepth(), {_x:_xmouse, _y:_ymouse});
this.setMask(test);

Thanks for your help,
Rick

This topic has been closed for replies.

1 reply

Inspiring
June 23, 2006
try eraserId:MovieClip = "test";

note the strict typing and semi colon

Sam
mmacromAuthor
Participant
June 23, 2006
Then I get the:

found String where MovieClip is required.

type missmatch error