Hi guys. I’m trying to animate a parchment/scroll opening horizontally. The parchment starts closed in the middle, with the two cylindrical pieces, “scrollright, scrollleft,” separating to reveal “scrollmiddle,” (a rectangle). How do I mask “scrollmiddle” so that it is revealed as the two ends separate?
I picture using two rectangular masks, each the size of half “scrollmiddle,” and having them move in opposite directions, in conjunction with “scrollright and scrollleft.” It’s probably a simple fix, but I was stumped
Any suggestions? Thanks!
reference: iPad 1, 1024x768, landscape orientation
Code follows -->
[lua]–MIDDLE PART OF SCROLL–
local scrollmiddle = display.newImage (“scroll-middle.png”)
localGroup:insert(scrollmiddle)
scrollmiddle.x = 500
scrollmiddle.y = 400
–MASK, NEED HELP!!! –
local mask = graphics.newMask( “mask.png” )
scrollmiddle:setMask( mask )
– RIGHT PART 0F SCROLL –
local scrollright = display.newImage (“scroll-right.png”)
localGroup:insert(scrollright)
scrollright.x = 565
scrollright.y = 370
transition.to( scrollright, { time=1500, alpha=1000, x = 900, y = 370 } )
– LEFT PART OF SCROLL –
local scrollleft = display.newImage (“scroll-left.png”)
localGroup:insert(scrollleft)
scrollleft.x = 465
scrollleft.y = 370
transition.to( scrollleft, { time=1500, alpha=1000, x = 120, y = 370 } ) [/lua] [import]uid: 19765 topic_id: 21009 reply_id: 321009[/import]
