It looks like you're new here. If you want to get involved, click one of these buttons!
frameCounter = 0 function onEnterFrame() frameCounter = frameCounter + 1 --after frame 1 start to remove shape if frameCounter > 1 then stage:removeChild(shape) end if frameCounter > 60 then frameCounter = 2 end --CreateShape shape = Shape.new() shape:setLineStyle(4, 0x000000) shape:setFillStyle(Shape.SOLID, 0xff0000, 0.5) shape:beginPath(Shape.NON_ZERO) local x1,y1 = actors[2]:getPosition() shape:moveTo(x1, y1) for i=2,#actors do if i==#actors then l = 2 else l = i+1 end local x2,y2 = actors[l]:getPosition() shape:lineTo(x2, y2) end shape:closePath() shape:endPath() stage:addChild(shape) end stage:addEventListener(Event.ENTER_FRAME, onEnterFrame) |
Comments
I did as you said but it's still raises the memory.
Edit: Yes memory usage is increasing Will be fixed. Thank you.