Posted by: vodka on: March 15, 2007
1 | quan
July 5, 2007 at 4:07 pm
2 | Geddesign
September 11, 2007 at 6:20 am
It looks a bit smoother if you drop it off at more accurate point. So instead of dropping the image at the mouseX, drop it at mouseX – (dragInitiator.width/2)
This centers the drop a little better. Do this for mouseX and mouseY.
(for mouseY use dragInitiator.height)
3 | Cosmin
September 17, 2007 at 1:27 pm
can you give me the hint for the inverse operation? I need to drag an image over a list, and I can’t find out the row index.
4 | Swaminathan
February 21, 2008 at 6:55 am
Thank you very much folk…. Cool Example…
5 | Mark Easton
April 20, 2008 at 5:55 pm
Geddesigns comment is incorrect, although his idea is right. I would note that if people are going to post such comments that they should try to be accurate else it throws so many people off. Bad Geddesign! dragInitiator.width and height are the settings for the TileList control. No good! I for example am dragging an image within the TileList control so want the width and height of that image. In my case it is a fixed size so I use that. Furthermore, there is no mouseX and mouseY available for the drag event. There is instead localX and localY attributes. So I used the following which gave me the desired result:
img.x = event.localX – (30/2);
img.y = event.localY – (30/2);
I agree too, cool example!
6 | shekhar
April 21, 2008 at 1:38 pm
7 | amar shukla
August 12, 2008 at 5:29 am
But Mark it will work only if you have images of similar dimesnsions otherwise it will not be useful..isn’t it?
So its not the permanent solution dude!
8 | Diseño web
September 3, 2008 at 2:24 pm
Thank you for this great example!
Your “FormattedStepper – NumericStepper with formatting support” is great too!!
Thank you for sharing! =)
9 | Stephen
October 8, 2008 at 3:05 pm
Looks good, but I’m working with Flex 3, and in order to get the example to work I had to change
Fill in your details below or click an icon to log in:
You are commenting using your WordPress.com account. ( Log Out / Change )
You are commenting using your Twitter account. ( Log Out / Change )
You are commenting using your Facebook account. ( Log Out / Change )
You are commenting using your Google+ account. ( Log Out / Change )
Connecting to %s
Notify me of new comments via email.
Create a free website or blog at WordPress.com.
The Albeo Theme.
Get every new post delivered to your Inbox.