Hi,
I’m new in corona operating,
Im trying move a group that contains images and another group inside animately,
on the inner group i added mask.
the animation works well but the mask not move synchronously with the group, it moves in different time and different directions
my code attached here
function createBallonCardHolder(card, fileName, hueAngle) local fileName = fileName or "Images/games/plane/letter\_holder.png" local letterHolder = display.newImage( fileName ) local cardBallonObject = display.newGroup( ) local maskGroup = display.newGroup( ) local cardMask = graphics.newMask( imagesPath .. "letter\_holder\_mask.jpg" ) cardBallonObject:insert( letterHolder ) cardBallonObject.anchorChildren = true if card ~= nil then maskGroup:insert(card) cardBallonObject:insert(maskGroup) card.width = 0.67\* 684 card.height = 0.67\* 752 card.x=0 card.y= 200 maskGroup:setMask(cardMask) maskGroup.x = letterHolder.x maskGroup.y = letterHolder.y maskGroup.maskScaleX = letterHolder.xScale maskGroup.maskScaleY = letterHolder.yScale end cardBallonObject.anchorX = 0.5 cardBallonObject.anchorY = 0.1 cardBallonObject.swingAmplitude = 16 cardBallonObject.transitionID = {} function cardBallonObject:returnAfterUndo(onComplete) transition.to( cardBallonObject, { x= 0, y = -300, time = 500 , transition = easing.inOutSine, onComplete = onComplete, tag = "return" } ) end function cardBallonObject:bringCardBallon(params) function cardBallonObject.flyUp( ) local time = params.ascendingTime or 3000 transition.from( cardBallonObject, { y = 500, time = time , transition = easing.inOutSine, tag = "flyUp" } ) end function cardBallonObject.rotateLeft() transition.to( cardBallonObject, { rotation = -cardBallonObject.swingAmplitude, time = 1000, onComplete = cardBallonObject.rotateRight, transition = easing.inOutSine, tag = "rotateLeft" } ) end function cardBallonObject.rotateRight( ) transition.to( cardBallonObject, { rotation = cardBallonObject.swingAmplitude, time = 1000, onComplete = cardBallonObject.rotateLeft , transition = easing.inOutSine, tag = "rotateRight"} ) end timersController:performWithDelay( params.delay, cardBallonObject.rotateRight ) timersController:performWithDelay( params.delay, cardBallonObject.flyUp ) end function cardBallonObject.cancelTransitions( ) transition.cancel("flyUp") transition.cancel("rotateLeft") transition.cancel("rotateRight") end return cardBallonObject end
what could make this problem?
thanks