8 Replies - 2939 Views - Last Post: 02 April 2014 - 11:34 AM

#1 MrCrostataH  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 29-March 14

How do my rectangle ring around an object?

Posted 29 March 2014 - 07:29 AM

I was making a simple game similar to Ping Pong, but i should make a rectangle ring around the player. I know how to make something move with keyboard, but i have no idea how do i make something turn around an object...

The rectangle should moveclockwise with A and anticlockwise with D
Is This A Good Question/Topic? 0
  • +

Replies To: How do my rectangle ring around an object?

#2 MrCrostataH  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 29-March 14

Re: How do my rectangle ring around an object?

Posted 29 March 2014 - 09:48 AM

That rectangle obviously should be always a certain number of pixels near the player, even if it moves
Was This Post Helpful? 0
  • +
  • -

#3 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 387
  • Posts: 1,409
  • Joined: 15-January 14

Re: How do my rectangle ring around an object?

Posted 31 March 2014 - 03:29 PM

The movie clip should have a property that controls its rotation.

http://help.adobe.co...t=00001350.html
Was This Post Helpful? 0
  • +
  • -

#4 MrCrostataH  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 29-March 14

Re: How do my rectangle ring around an object?

Posted 01 April 2014 - 04:29 AM

It would only rotate on itself... ( however i use Actionscript 3.0 )
Was This Post Helpful? 0
  • +
  • -

#5 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 387
  • Posts: 1,409
  • Joined: 15-January 14

Re: How do my rectangle ring around an object?

Posted 01 April 2014 - 10:41 AM

Yes, it rotates. I'm not sure what else you're asking for.
Was This Post Helpful? 0
  • +
  • -

#6 MrCrostataH  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 29-March 14

Re: How do my rectangle ring around an object?

Posted 02 April 2014 - 07:57 AM

I was searching for a method to make something rotate on another thing. The center of the rotation should be outside the rectangle, not on it's center.
Was This Post Helpful? 0
  • +
  • -

#7 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 387
  • Posts: 1,409
  • Joined: 15-January 14

Re: How do my rectangle ring around an object?

Posted 02 April 2014 - 09:54 AM

I believe that depends how you set up the movie clip. You can place the origin of the movie clip anywhere you want, and that will be the center point that it uses for things like X and Y position and rotation. I'm not sure if there's a way to programmatically move the origin, I've always changed that when creating the movie clip in the GUI.
Was This Post Helpful? 0
  • +
  • -

#8 MrCrostataH  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 29-March 14

Re: How do my rectangle ring around an object?

Posted 02 April 2014 - 11:03 AM

I think it's not. However i figured out how to use polar coordinates using multiple coordinate sistems...
Was This Post Helpful? 0
  • +
  • -

#9 MrCrostataH  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 29-March 14

Re: How do my rectangle ring around an object?

Posted 02 April 2014 - 11:34 AM

Ok i figured out it only translates the movieclip around the other object but it doesn't rotate at all... I'll figure out how to change the origin... Thanks anyway.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1