Skip navigation
SLee2
Currently Being Moderated

How can I build an animated drag and drop multimeter lead using Flash?

Mar 21, 2013 2:19 PM

Tags: #as3 #action_script_3 #actionscript #flash_professional #flash_cs5.5 #animation #cs6

I am building a virtual multimeter for testing simulated circuits. I would like to be able to drag an animated multimeter test lead to a point in the circuit and drop it on a target. The static drag and drop is not my issue. I would like some suggestions on how I can animate the movement of the lead itself. Any suggestions would be appreciated.

 
Replies
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    Mar 21, 2013 5:24 PM   in reply to SLee2

    while you're dragging, that is the animation.  when dropped you can animate the object to where you want it to go.

     
    |
    Mark as:
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    Mar 22, 2013 6:50 AM   in reply to SLee2

    you want something to "follow the mouse" but not be dragged?

     

    if yes, use a loop (enterframe) and ease the object's position to the mouse:

     

    object.x+=speed*object.x+(1-speed)*mouseX;

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points