The Daily Click ::. Forums ::. Klik Coding Help ::. Resizing Active System Box
 

Post Reply  Post Oekaki 
 

Posted By Message

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
18th July, 2006 at 07:32:41 -

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


 
This is a signature. Have this one on me.

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
18th July, 2006 at 09:31:48 -

+ 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.

Image Edited by the Author.

 
n/a

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
18th July, 2006 at 09:50:14 -

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 ^^

Edit: Nevermind I think it does work..

Image Edited by the Author.

 
This is a signature. Have this one on me.

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
18th July, 2006 at 09:57:50 -

Oh, sorry. Top-left then.

+ 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.

Image Edited by the Author.

 
n/a

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
18th July, 2006 at 09:58:18 -

Righteo I'll try that now and see how it works.
Thanks for the help

 
This is a signature. Have this one on me.

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
18th July, 2006 at 10:07:24 -

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..)

 
This is a signature. Have this one on me.

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
18th July, 2006 at 10:19:15 -

Bottom-left:

+ 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

 
n/a
   

Post Reply



 



Advertisement

Worth A Click