Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Moving a image but not the mask!
Started by pablo62 Aug 29 2016 02:19 AM

- - - - -
1 reply to this topic
mask image moving

Best Answer pablo62 , 29 August 2016 - 07:35 AM

Finally I used containers to apply mask in a portion of screen, thanks!

[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

pablo62

[GLOBAL: userInfoPane.html]
pablo62
  • Observer

  • 15 posts
  • Corona SDK

I'm trying to make a simple game, I want to move a image from down to up, with a mask, I use a transition but the mask is move with the image!!!!

 

local tmp, mascara
 
tmp  = display.newImageRect( actores, 'toy.png', 80, 140 )
tmp.x = tablaPosiciones[ posicion ].x
tmp.y = tablaPosiciones[ posicion ].y
mascara  = graphics.newMask('toymask.jpg')
tmp:setMask( mascara )
timer.performWithDelay( 500, transition.to( tmp, {time=2500, maskY = tablaPosiciones[ posicion ].y , y = tablaPosiciones[ posicion ].y - 60 }), 1 )


Edited by pablo62, 29 August 2016 - 02:22 AM.


[TOPIC: post.html]
#2

pablo62

[GLOBAL: userInfoPane.html]
pablo62
  • Observer

  • 15 posts
  • Corona SDK

  Best Answer

Finally I used containers to apply mask in a portion of screen, thanks!




[topic_controls]
[/topic_controls]