3 Replies Latest reply on Jun 15, 2009 3:03 PM by Flex harUI

    Coordinate System

    Abel Corver Level 1


      Hey everyone,

      this is my first post here


      I've been programming for quite a while now, both web and desktop apps, but I'm very new to Flash and Flex. I want to give it a try though to make my homepage much cooler


      Could you guys please explain to me how the coordinate system works?

      When I draw a simple rectangle...


      graphics.beginFill( 0xff0000 , 0.5 );

      graphics.moveTo( -50.0 , -50.0 );

      graphics.lineTo(  50.0 , -50.0 );

      graphics.lineTo(  50.0 ,  50.0 );

      graphics.lineTo( -50.0 ,  50.0 );




      ... i get a rectangle, just as I expected. However, when I resize the window, the rectangle moves to the center, making the left side visible also, and when I make the window's height larger the rectangle moves to the middle, making the top of the rectangle visible.


      This happens when I run it from within Flex Builder. I don't know if this has anything to do with that.

      Does the 'flash area' on the automatically generated webpage has a fixed aspect ratio or something?