Hm right basically I have an active system object and then 4 small square shaped active objects which act as resizing handles. I have set the handles to always position on each of the four corners of the active system object. What I want to do is be able to resize the object using all of these four handles. So far I have only managed to do this using the bottom right handle - using the following event:
+ User clicks bottom right handle
- Bottom right handle: Set flag 0 on
+ Bottom right handle: Flag 0 is on
- Active System Box: Set width to XMouse - X( "Active System Box" )
- Active System Box: Set height to YMouse - Y( "Active System Box" )
+ Mouse key is not being pressed
- Bottom right handle: Set flag 0 off
These events work fine - however I am struggling with the other three handles as the position of the box also needs to change I think? I'm not too clever when it comes to maths so any help would be appreciated
+ User clicks left handle
- left handle: Set flag 0 on
+ left handle: Flag 0 is on
- Active System Box: Set width to X Right( "Active System Box" ) - XMouse
- Active System Box: set X position to XMouse
+ Mouse key is not being pressed
- left handle: Set flag 0 off
Assuming I get what your problem is, that (hopefully) should work for the left handle, which should give you an idea how to do the rest. If you can't get X Right() from a ASB like you can an active you'll just need X + width, of course.
The handles are in the four corners though - so top left, top right, bottom left and bottom right. Plus I don't think that will work for the left handle will it? Because it'd just resize the right side of the box rather than making the box bigger from the left side.. if you know what I mean?? Anyway I think it's a bit tricky ^^
+ User clicks topleft handle
- left handle: Set flag 0 on
+ topleft handle: Flag 0 is on
- Active System Box: Set width to X Right( "Active System Box" ) - XMouse
- Active System Box: Set height to Y Bottom( "Active System Box" ) - YMouse
- Active System Box: set position to XMouse, YMouse
+ Mouse key is not being pressed
- topleft handle: Set flag 0 off
I think that'd work.
Because it'd just resize the right side of the box rather than making the box bigger from the left side..
No, see, the box is also repositioned at the same rate that it is resized, so the right and bottom sides should stay stationary. Unless I've fucked up or mis-guessed how the handle code works.
Right well top left works fine but still can't seem to get bottom left and top right to work O_o
Maybe I'm being stupid and not thinking good enough (it's hot here..)
+ User clicks bottom-left handle
- bottom-left handle: Set flag 0 on
+ bottom-left handle: Flag 0 is on
- Active System Box: Set width to X Right( "Active System Box" ) - XMouse
- Active System Box: Set height to YMouse - Y( "Active System Box" )
- Active System Box: set X position to XMouse
+ Mouse key is not being pressed
- bottom-left handle: Set flag 0 off
Top-right:
+ User clicks top-right handle
- top-right handle: Set flag 0 on
+ top-right handle: Flag 0 is on
- Active System Box: Set width to XMouse - X( "Active System Box" )
- Active System Box: Set height to Y Bottom( "Active System Box" ) - YMouse
- Active System Box: set Y position to YMouse
+ Mouse key is not being pressed
- top-right handle: Set flag 0 off