3 Replies Latest reply on Oct 19, 2009 9:22 PM by Flex harUI

    .move not working

    flairjax Level 1

      So I have created a custom spark component with a spark skin and on EnterFrame I am telling the the component to move via

       

      superDetailCallout.move( 10, 30 );  // superDetailCallout is a popup that extends s:Panel.

       

      Am I missing something?

        • 1. Re: .move not working
          Flex harUI Adobe Employee

          Where does it end up?

           

          Alex Harui

          Flex SDK Developer

          Adobe Systems Inc.

          Blog: http://blogs.adobe.com/aharui

          • 2. Re: .move not working
            flairjax Level 1

            It didn't move.  I figured out the issue I was using the point clicked on a line and kept feeding that same point in, duh.  My issue is I have a line with two end points.  I need to capture the point of the line where the user clicked and place a sprite over that area.  The problem is the two end nodes can be dragged further apart of closer to together thus i need the sprite to keep its spot on the line where the user clicked no matter how long becomes later.

             

            Not sure of the math for this. Not sure if I should grab the point location and find the percentage of the click point from one of the ends or to use the hard clicked point in pixels ( user clicked 150 pixels from one of the ends).

             

            ???

             

            TIA, J

            • 3. Re: .move not working
              Flex harUI Adobe Employee

              It depends on what the semantics of the two end nodes.  If moving them closer is scaling, then you want percentage, if it simply reduces the range then you want to track absolute position.

               

              Alex Harui

              Flex SDK Developer

              Adobe Systems Inc.

              Blog: http://blogs.adobe.com/aharui