This content has been marked as final. Show 2 replies
You will need to change the regpoint of the mask member when you move
the sprite. Mask ink in Director uses the cast member that is next to
the member of the sprite that is set to use mask ink. This method made
sense once upon a time, but is really difficult to work with now.
Since the mask member is not actually represented on the stage, it's
position is always relative to it's regpoint and the regpoint of the
member it is masking. As you've seen, if you move the sprite 2 pixels to
the right, the mask moves the same distance. To keep the mask in a
static location, you have to change it's regpoint as you move the sprite.
Here's an example behavior:
property thisSprite -- the sprite to be animated
property thisMember -- the member of the sprite
property maskMember -- the member used as a mask
on beginSprite me
thisSprite = me.spriteNum
thisMember = sprite(thisSprite).member
maskMember = member(thisMember.memberNum + 1, thisMember.castLib).name
on mouseUp me
sprite(thisSprite).locH = sprite(thisSprite).locH + 3
member(maskMember).regPoint = member(maskMember).regPoint - point(3,0)
As you click on the sprite, it will move to the right and the mask's
regpoint will be moved to the left, making the mask seem to stay in
place as the sprite moves.
Does this help?
Adobe Community Expert
thanks for that!!