ActiveDen

dragFx

The most realistic click, drag and throw effect out there.

dragFx (as2) adds an organic drag and throw effect to a movieclip. It slides, shifts and rotates as you click and drag the symbol around. You can throw it and watch it slide and ease. Easily customizable single & double click functionality. Use it for draggable photo slides in a gallery, an interactive deck of cards, some game functionality or just have fun and experiment with new possibilities.

Simply copy paste the code on to any movie clip to add dragFx. Easily customizable. Easy to set motion blur strength, blur quality, & drag speed preferences commented in the code.

Clean and well commented code.

To use dragFx:


Simply copy paste the code on to a movieclip to add dragFx to it. Make sure you center the symbol, graphic text, button or anything else within your movieclip. Meaning… center your “registration point”.

click, double click, drag and throw!

Available Preferences:


Set up double click action:

‘Double click’ is set up by default to ‘0’ the rotation of the dragFx clip (your symbol). There is a // If double click – Do this// comment in the code. You can simply replace or add the code you want to execute when the user double clicks.

Set up single click action:

Find the following comment in the code… ’// If single click – Do this’ ...and replace it with the code you want to execute when the user clicks.

Variables:

There is a // SETTINGS // comment at the top of the code where you can modify general effect settings:

  • var dragSpeed = 0.2;
  • var blurStrength = 0.1;

IMPORTANT NOTE :

Make sure your symbols registration point is aligned to the “center”. Meaning… make sure your symbol contents are centered in your symbol. There should be a small cross hair (the registration point) in the center of your symbol.

by
by
by
by
by