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?
Where does it end up?
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
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
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.