Be a Supporter!

MovieClip positions

  • 207 Views
  • 7 Replies
New Topic Respond to this Topic
Tygerman
Tygerman
  • Member since: Aug. 16, 2003
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
MovieClip positions 2009-03-20 21:19:18 Reply

Ok, this is an odd situation.

For all intents and purposes this is the only code I have:

shipGreen_mc.x = 360;
shipGreen_mc.y = 630;

shipRed_mc.x = 360;
shipRed_mc.y = 630;

(I have other code but the problem still happens even if I comment out all my code except for the code above)

As far as I can tell they should be in the exact same spot right?

but this is the result:

...what the hell?

MovieClip positions


BBS Signature
TheSongSalad
TheSongSalad
  • Member since: Jan. 17, 2009
  • Offline.
Forum Stats
Member
Level 19
Audiophile
Response to MovieClip positions 2009-03-20 21:30:29 Reply

is that how they are drawn on your screen? because to call an objects 'x' or 'y' position, you need to write '_x' or '_y' for example, this._x = 360;

Tygerman
Tygerman
  • Member since: Aug. 16, 2003
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to MovieClip positions 2009-03-20 21:46:52 Reply

that is not how it's drawn on stage, no

also I'm using AS3 which uses MovieClip.x now


BBS Signature
Morphed-Chaos
Morphed-Chaos
  • Member since: Mar. 9, 2005
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to MovieClip positions 2009-03-20 21:51:31 Reply

Ah, AS3, I'm still using AS2 myself.

Do you have them on the same layer? For what it looks like, they can't overlap so one gets put on top of the other or something.

Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to MovieClip positions 2009-03-20 21:53:00 Reply

Make sure the registration point for both MC's is the same - ie, centre them both on 0,0


- - Flash - Music - Images - -

BBS Signature
Tygerman
Tygerman
  • Member since: Aug. 16, 2003
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to MovieClip positions 2009-03-20 22:18:04 Reply

The same thing happens when I change their x and y co-ordinates to 0 in the properties window. Or is that not what you meant?

Also, putting them on different layers doesn't change anything


BBS Signature
TheSongSalad
TheSongSalad
  • Member since: Jan. 17, 2009
  • Offline.
Forum Stats
Member
Level 19
Audiophile
Response to MovieClip positions 2009-03-20 22:37:45 Reply

he means the point that is the movie clip. this is usually in the center of your drawing, but not always the case. its a little hard to explain, but i think when you click on it, there's a little circle inside of the drawing. that's the registration point. i may be wrong, so someone else correct me if they can, as the registration point is kinda hard for me to put into words.

Tygerman
Tygerman
  • Member since: Aug. 16, 2003
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to MovieClip positions 2009-03-20 22:39:44 Reply

oh, right, yah the registration point is the same for both of them


BBS Signature