How to do this

Out of context: Reply #2

  • Started
  • Last post
  • 6 Responses
  • rson0

    um

    try something like this you will have

    function moveAndScale(instanceName, targetWidth, targetHeight, targetX, targetY, factor) {

    instanceName._x += (targetX-instanceName._x)/factor...
    instanceName._y += (targetY-instanceName._y)/factor...
    instanceName._width += (targetWidth-instanceName._width...
    instanceName._height += (targetHeight-instanceName._heig...

    }

View thread