2 Replies Latest reply on Dec 23, 2008 10:15 AM by ronabarrett@yahoo.com

    Relative positioning in an absolute layout

    ronabarrett@yahoo.com
      In laying out MXML objects within a Cavas container, I wish to position an object, myObject2, relative to the position of another object, myObject1. Such that, if myObject1's (x,y) position is (50,75), myObject2's position is (myObject1.x + 10, myObject1.y -20).

      I tried the Number () function, but receive the compiling error:
      "Initializer for 'x': cannot parse value of type Number from text '(Number(myObject.x)+10)'. "
      Of course, I receive a similar compiling error for the y-position.

      How can the layout position of an MXML object be defined using the coordinates of another object's x and y values?