A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: y position

  1. #1
    Flash n00b
    Join Date
    Jun 2005
    Location
    Somewhere Witty
    Posts
    81

    y position

    i made a simple program where part of it was lining up 3 items vertically
    i used the code
    Code:
    thing1._y = 50
    thing2._y = 50
    thing3._y = 50
    but for some reason they were not lined up

    when i modifyed theyre positions by manually putting 50 in their y co-ordinate boxes, they lined up fine

    why did this happen?
    Last edited by notquitehere188; 08-08-2005 at 07:34 PM. Reason: spelling
    Everything tastes better with rabies!

  2. #2
    Member
    Join Date
    Aug 2004
    Location
    China
    Posts
    43
    maybe you forget tell FLASH where the things is. is it in the _root ,or in a MC ?
    welcome to my blog: hi.baidu.com/2rainbow

  3. #3
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    Make sure all the clips have their registration points in the same place.

  4. #4
    Flash n00b
    Join Date
    Jun 2005
    Location
    Somewhere Witty
    Posts
    81
    registration points? dosent it just measure from the top left corner?
    Everything tastes better with rabies!

  5. #5
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    The registration point is usually (by default) in the centre of the clip. though it can be set anywhere. edit the clip and check where the point (0, 0) is in relation to the content of the clip.

    When you set the position of the clip with actionscript it's the point (0, 0) that will be placed at the point set by your script.

  6. #6
    Flash n00b
    Join Date
    Jun 2005
    Location
    Somewhere Witty
    Posts
    81
    is there a setting i can change so that it measures X, and Y in actionscript from the top left corner but still have the registration point in the bottom right.
    I have programmed so many games in VB using top left and i need the rotation in bottom right so there would inevitably be glitches where i forget that X, and Y are in different places
    Everything tastes better with rabies!

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center