Snap to Objects and Alignment Code Tutorial

Hi folks,
Does anyone know of an AS3 code tutorial with a method for object ‘snapping’. This is for a design software made with AS3 and Animate.

  • When dragging multiple MovieClips and Text objects on Stage, objects will snap to align with each other (vertically or horizontally) when they are close to each other.

  • When a draggable Movieclip is close the centre of a background Movieclip it ‘snaps to middle.’

This is standard on all design programs like Adobe Animate (when you use it as a designer) Photoshop, Canva etc, but I don’t know how difficult this is to code in AS3.

Any suggestions welcome!

Thanks,
Matt

http://www.freeactionscript.com/?s=drag+and+drop

did you seriously not found anything on google?

Flash & Math was a good resource for this kind of things

Drag n Drop in Flash CS3
http://www.flashandmath.com/basic/dragdroptour/dd_tour1.html (rotten link)

web archive

keep clicking bottom right Go to the next page >

the tutorial bring you step by step to “snap to grid” / “snap to location” etc.

Thanks very much Zwetan, I’ll have a look at those tutorials.

That was always such a useful site. Glad it’s still online. All the web searches I did for this were for designers (e.g how to turn on snapping in Animate)