User Tag List

Results 1 to 9 of 9

Thread: Mac - Drawing a Straight Line Between Two Objects?

  1. #1
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jul 2006
    Location
    Pittsburgh, PA, USA
    Posts
    777
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mac - Drawing a Straight Line Between Two Objects?

    I have two active objects (one stationary, one following the player's mouse), and I want a straight line to be drawn between them while the player moves his mouse. I've seen examples of how to do this, but they all require extensions that are not java or flash-compatible, which means they cannot be run on a mac.

    Is there a way to draw a straight line using only extensions compatible with the java or flash runtime? :crazy:

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Paul_Boland's Avatar
    Join Date
    Jun 2006
    Location
    Waterford, Ireland.
    Posts
    2,739
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mac - Drawing a Straight Line Between Two Objects?

    The Draw Object seems to be Java available but not Flash. You can use its Line Tool to draw a line. You need to Always erase the draw area and then redraw the line so as to give the effect of a line following the mouse pointer. I used this in DigiGraph 2.
    KnightTrek Productions
    http://www.knighttrek.com

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mac - Drawing a Straight Line Between Two Objects?

    You can always draw a simple line using an Active. Create an Active that is one pixel wide and the desired thickness of the line in height. Then when you need to draw the line, set its scale to the distance between the startpoint and endpoint, and its angle to the angle between the startpoint and endpoint. If you don't want you use the mathematical equations for this, the Clickteam Movement Controller has expressions for this purpose, I believe it is compatible with all runtimes.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jul 2006
    Location
    Pittsburgh, PA, USA
    Posts
    777
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mac - Drawing a Straight Line Between Two Objects?

    Quote Originally Posted by Jaffob
    You can always draw a simple line using an Active. Create an Active that is one pixel wide and the desired thickness of the line in height. Then when you need to draw the line, set its scale to the distance between the startpoint and endpoint, and its angle to the angle between the startpoint and endpoint. If you don't want you use the mathematical equations for this, the Clickteam Movement Controller has expressions for this purpose, I believe it is compatible with all runtimes.
    That is an awesomely creative way of accomplishing it! Thank you!

  5. #5
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mac - Drawing a Straight Line Between Two Objects?

    The Surface Object is compatible with Flash, and can be used to do this. It's basically an updated Overlay Redux. In other news, it's been ages since I saw you here :P

  6. #6
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jul 2006
    Location
    Pittsburgh, PA, USA
    Posts
    777
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mac - Drawing a Straight Line Between Two Objects?

    Quote Originally Posted by Jacob
    The Surface Object is compatible with Flash, and can be used to do this. It's basically an updated Overlay Redux. In other news, it's been ages since I saw you here :P
    Yes! Unlike you, I have not always existed. :grin:

    Thanks for this. The Active method was fun, but the Surface Object makes nicer-looking lines.

  7. #7
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Paul_Boland's Avatar
    Join Date
    Jun 2006
    Location
    Waterford, Ireland.
    Posts
    2,739
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mac - Drawing a Straight Line Between Two Objects?

    Quote Originally Posted by Jaffob
    You can always draw a simple line using an Active. Create an Active that is one pixel wide and the desired thickness of the line in height. Then when you need to draw the line, set its scale to the distance between the startpoint and endpoint, and its angle to the angle between the startpoint and endpoint. If you don't want you use the mathematical equations for this, the Clickteam Movement Controller has expressions for this purpose, I believe it is compatible with all runtimes.
    The only problem with this is it will only work for drawing the line once. The original question was to have a connecting line between a point and the mouse pointer. If you use this method above, you'll end up with a load of line wipes across the screen as you move the mouse, or with no connecting line and only one line drawn between two points.
    KnightTrek Productions
    http://www.knighttrek.com

  8. #8
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jul 2006
    Location
    Pittsburgh, PA, USA
    Posts
    777
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mac - Drawing a Straight Line Between Two Objects?

    Quote Originally Posted by Paul_Boland
    Quote Originally Posted by Jaffob
    You can always draw a simple line using an Active. Create an Active that is one pixel wide and the desired thickness of the line in height. Then when you need to draw the line, set its scale to the distance between the startpoint and endpoint, and its angle to the angle between the startpoint and endpoint. If you don't want you use the mathematical equations for this, the Clickteam Movement Controller has expressions for this purpose, I believe it is compatible with all runtimes.
    The only problem with this is it will only work for drawing the line once. The original question was to have a connecting line between a point and the mouse pointer. If you use this method above, you'll end up with a load of line wipes across the screen as you move the mouse, or with no connecting line and only one line drawn between two points.
    I actually ended up using the Active method because neither the Surface Extension nor the Flash Draw Extension were working properly.

  9. #9
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mac - Drawing a Straight Line Between Two Objects?

    Quote Originally Posted by Paul_Boland
    Quote Originally Posted by Jaffob
    You can always draw a simple line using an Active. Create an Active that is one pixel wide and the desired thickness of the line in height. Then when you need to draw the line, set its scale to the distance between the startpoint and endpoint, and its angle to the angle between the startpoint and endpoint. If you don't want you use the mathematical equations for this, the Clickteam Movement Controller has expressions for this purpose, I believe it is compatible with all runtimes.
    The only problem with this is it will only work for drawing the line once. The original question was to have a connecting line between a point and the mouse pointer. If you use this method above, you'll end up with a load of line wipes across the screen as you move the mouse, or with no connecting line and only one line drawn between two points.
    What do you mean? If you only want one line shown at a time, re-scale and re-rotate the active. If you want more than one, create another active. Doesn't that work?

Similar Threads

  1. Straight beam which colides with objects
    By dub in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 10th October 2008, 04:52 PM
  2. Drawing line.
    By Roseweave in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 12th March 2008, 10:16 PM
  3. Follow the Leader in a straight line widget.
    By Dynamite in forum Widgets
    Replies: 0
    Last Post: 30th January 2008, 05:04 AM
  4. Drawing line between objects
    By Skeets in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 15th November 2007, 01:57 AM
  5. drawing a line
    By delusan in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 8th June 2007, 06:26 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
  •