Hi All,

>> I'm magnifying a picture with a script like below:

on mouseDown me
   pScale = pScale * 1.5    --  or '/ 1.5' to shrink
   sprite(n).height = sprite(n).height * pScale/100
   sprite(n).width  = sprite(n).width  * pScale/100

   PositionSprite_Xpos
end mouseDown me

>> now i want to have 'after the magnify' the same point of the picture under
the mouse
    and i try to do it this way:

on PositionSprite _Xpos me
       .....

       a = sprite(n).locH
       b = the mouseH
       c = sprite(n).width
       X_DistanceToCenter = b - a
       XtotalDistance    = c / 2

       Sprite(n).locH = Sprite(n).locH - (( X_DistanceToCenter * pScale) /
XtotalDistance)
end PositionSprite _Xpos me

>> and the same for the Y_position.

>> I've tried different formula's and it never works exact!
>> Anyone an idea to do make the position right after magnifying?



Milo Mineur 


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to