User Tag List

Results 1 to 8 of 8

Thread: Dragging a box with mouse?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleSWF Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    842
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dragging a box with mouse?

    Anyone know how to how i can go about this? In some application you can click and drag a box out with your mouse, like you can on your desktop to select icons.

    Im wanting something like that in my app and well... i seem to be going a very long way around it and im sure there must be an easier way?

    Cheers
    Andy

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator ProPatch Maker
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DJFuego's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    1,416
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Dragging a box with mouse?

    Use the Overlay object to load a 1X1 pixel BMP (or set a colour of your choice) and make it semi-transparent.
    When you click position the top left of the overlay at mouse X,Y then while the mouse is clicked set the bottom left of the overlay object to mouse X,Y. It's a neat effect. Try it.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleSWF Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    842
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dragging a box with mouse?

    Yea sounds like that would work but i cant find anywhere to position the top left and bottom left ETC? you can position in the frame, or simply resize it?

    Cheers
    Andy

  4. #4
    No Products Registered

    Join Date
    Jul 2006
    Location
    www.dingdongstudios.co.nr
    Posts
    505
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dragging a box with mouse?

    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=41543&page=0#Po st41543

    There you go, made an example for ya!

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleSWF Export Module

    Join Date
    Sep 2006
    Location
    UK
    Posts
    842
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dragging a box with mouse?

    cheers bud

  6. #6
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Dragging a box with mouse?

    I wouldn't recommend using the overlay object for that.
    Active Objects are way faster for that kind of thing, but a better (faster) approach would be to use two instances of two active objects. One object for the line at the top/bottom and one for the line at the left/right. You can make the actives 1x1 in size and then scale them to get the size you want. Then your objects don't cover a large area so objects beneath the "rectangle" you cover aren't forced to redraw.
    It's a little tricky but maybe worth the effort if you find that the other approach is slowing down your game.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator ProPatch Maker
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DJFuego's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    1,416
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Dragging a box with mouse?

    The active picture object won't use minus values though. DingDong, that was QUICK! Ahhh active system box good idea!

  8. #8
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dragging a box with mouse?

    i think from memory I used an active system box. Just make the body transparent and change the border to whatever colour you want and it will give you a similar effect.

    Then I had two little 'dots', one which goes to mouse position when user clicks, then another which always follows mouse co-ordinates. Then I simply resized the system box between the 2 points and viola.

    Its just a matter of adding a few lines of code in the detect where the mouse is in relation to the original click point to resize the box accordingly. ie: if X 'click dot' > X 'mouse dot' then set position of system box' to X 'mouse dot' and resize between the two points.

    Hope this makes sense. Im at work so can't make an example right now!

Similar Threads

  1. Dragging active objects with mouse.
    By keokeo in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 7th November 2010, 08:06 PM
  2. Mouse Dragging Image
    By Wra1thus in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th May 2010, 05:22 AM
  3. Dragging playfield with mouse
    By Ran_TH in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 23rd June 2009, 10:54 AM
  4. Dragging objects with Mouse
    By Tommy in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 28th January 2007, 08:51 PM
  5. Dragging the box in the "mouse in zone" editor bug
    By Alonso in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 10th July 2006, 05:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •