PDA

View Full Version : Movable Graphics...


Crafty1980
11-24-2006, 08:22 PM
Hi there,

Can someone tell me how I can write script to be able to click and hold down on simple little graphics in my main fla background and move them around?

It's basically lods of different shapes that you need to put together to make a larger picture.

Has it got something to do with the code below??

onClipEvent(mouseDown)
{
if(this.hitTest(_root._xmouse, _root._ymouse, false)) //if this magnet is grabbed
_parent.startDrag() //start dragging the magnet
}

onClipEvent(mouseUp)
{
_parent.stopDrag() //stop dragging the magnet
}

I don't know how or where to use it though! :(

Crafty1980
11-24-2006, 08:49 PM
Actually... cancel that! I've worked it out...

Now... the major problem I have once I've finished making my shapes for people to play with, I want to put this onto my myspace page so I want people to be able to draw pictures with the shapes BUT allow them to hit some sort of "save" button for others to see! Is this possible? A bit like the Fridge magnet things you see when people can play around with the letters then hit "save" and it saves it... or you can reset it...

How is this done! can someone tell me please?

oli_pantelides
07-11-2009, 06:23 PM
Hi there

I have been looking to do this for a long time How did you manage to do it.

:D


Hi there,

Can someone tell me how I can write script to be able to click and hold down on simple little graphics in my main fla background and move them around?

It's basically lods of different shapes that you need to put together to make a larger picture.

Has it got something to do with the code below??

onClipEvent(mouseDown)
{
if(this.hitTest(_root._xmouse, _root._ymouse, false)) //if this magnet is grabbed
_parent.startDrag() //start dragging the magnet
}

onClipEvent(mouseUp)
{
_parent.stopDrag() //stop dragging the magnet
}

I don't know how or where to use it though! :(