hi,
I have this problem with this external module :
- i make a another group with a rectangle and images (groupe)
- externally at this group i make a mask who must be in front of
the problem is that the mask is below. i use
e.body.mask:toFront()
but it’s still below. the snippet is a the bottom. I could use an another external module to solve this but i would understand
how it’s possible like this. thanks for your help.
local p=require( "parameters" ) local paper={} local paper\_mt = { \_\_index = paper } --set metatable -------------------------------------------------------------------------------- -- public function -------------------------------------------------------------------------------- function paper.draw( group,posx,posy,numberOfPaper,width) local e={} --e for paper height = numberOfPaper\*width local groupe = display.newGroup() groupe.main=display.newRect(groupe,0,0,width,height) groupe.main.anchorY=0 groupe.unite = {} for i=1, numberOfPaper do groupe.unite[i]=display.newImageRect(groupe,"paper2.png",width,width) groupe.unite[i].anchorY=1 groupe.unite[i].y=i\*width end e.body=groupe e.body.x=posx e.body.y=posy e.body.anchorY=1 --here i can't have e.body.above who is in front of e.body e.body.above = display.newRect(group,posx+10,p.position.limit,width,height) e.body.above:setFillColor(0,0,0) e.body.above.anchorY = 0 return setmetatable ( e,paper\_mt ) end return paper