Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Moving image but not mask
Started by e7k_Erik May 09 2013 11:08 AM

* * * * * 1 votes
5 replies to this topic

Best Answer rooneydesign , 11 May 2013 - 12:19 PM

Put your image in a group. Then set the mask on the group. You should be able to move your image within the group without moving the mask.

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

e7k_Erik

[GLOBAL: userInfoPane.html]
e7k_Erik
  • Enthusiast

  • 85 posts
  • Corona SDK

Is is possible to move an image with transition, but not moving the mask. I want to have my mask in a fixed place and then move my image through the mask, and stopping the image in the center of the where the mask is placed.

 

How do i do that?



[TOPIC: post.html]
#2

e7k_Erik

[GLOBAL: userInfoPane.html]
e7k_Erik
  • Enthusiast

  • 85 posts
  • Corona SDK

No one? 

I reformulate the question, as I see I might have been unclear.

 

I want to position a mask in a fixed position on the screen. And then i want to move the image that the mask is applied to using transition. How should i position the mask? When i try to position the mask using image.maskY and image.maskX before the transition, the mask seems to move togheter with the image transition, making the image invisible, since the image and mask moves with space apart. 



[TOPIC: post.html]
#3

rxmarccall

[GLOBAL: userInfoPane.html]
rxmarccall
  • Contributor

  • 751 posts
  • Corona SDK

Yea wish I could help, I wonder the same thing.  Once you apply a mask to an object, to move the mask it seems that you change the x, y values of the object and that moves the mask around, its really strange and seems backwards.



[TOPIC: post.html]
#4

rooneydesign

[GLOBAL: userInfoPane.html]
rooneydesign
  • Observer

  • 1 posts
  • Corona SDK

  Best Answer

Put your image in a group. Then set the mask on the group. You should be able to move your image within the group without moving the mask.



[TOPIC: post.html]
#5

e7k_Erik

[GLOBAL: userInfoPane.html]
e7k_Erik
  • Enthusiast

  • 85 posts
  • Corona SDK

Put your image in a group. Then set the mask on the group. You should be able to move your image within the group without moving the mask.

 

Thanks, that worked perfectly  :)



[TOPIC: post.html]
#6

dimd

[GLOBAL: userInfoPane.html]
dimd
  • Enthusiast

  • 92 posts
  • Corona SDK

Thanks! Great question and great answer!




[topic_controls]
[/topic_controls]