Hey guys, not sure if this is possible but i'd like to get the X,Y coordinates of a button I drag. here's my problem:
public function backbuttonDown(e:MouseEvent)
public function backbuttonMove(e:MouseEvent)
the x and y coordinates remain the same even though i'm clearly dragging my button all over the stage. I did code my own by putting events and whatnot around the button but startDrag seemed smoother and faster. is it even possible?
^ I tested that code before posting it, and it's a 100% working code.
If it didn't work for your then obviously you are doing something wrong.
Alright, I tested it again and nothing. I'll tell you what I did:
Create new flash 3.0 file, create new actionscript file called test.as. From here I linked in the document class to be this test.as file. I also included the Button component into the library so I can see it. in the test.as file is the following code, please try these steps and tell me if it works for you.
k, you are right about the movie clip, that works great. but try a fl.controls.Button. Tried Simplebutton but unfortunately there's no drag on that guy. maybe it's just a flaw in the actionscript code?
^ You can't do that with button symbols. Button symbols are primitive and were design to do things fast... if you are planing on complex stuff in the future, then try not to use button symbols ever again... your best friend is the Movie Clip, stick to it.
| Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro | WebLog:http://blog.wisebisoft.com/ |
| Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
| Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/ | By perseverance the snail reached the ark. |