PDA

View Full Version : Click and drag



Jt_01
July 24th, 2007, 12:42 PM
Hi,

I has a clip that gets copied if you click and drag. However, if you copy another clip from the main clip the new clip seems to overide the previous clips actions. Basically as you roll over a copied clip flash needs to detect it.

I have attached a fla that explains this much, much better! Hope someone can help!

Thanks

rabidGadfly
July 24th, 2007, 01:52 PM
Change

newone._x = _root.stickeeclip._x
newone._y = _root.stickeeclip._y

to

newone._x = item._x;
newone._y = item._y;

and then add the following code just above the line that says "Mouse.addListener(_global.newone);"



newone.onPress = function() {
_global.gopress = true;
trace("po__ "+po)
po=po+1
_root.duplicate(this);
}

Jt_01
July 24th, 2007, 05:03 PM
Thanks for replying. I tried that but sorry I didnt explain properly. Basically the "postit" on the bottom lef is the pad and a user just clicks on this one to create bew instances. Rather than clicking on ones that have been created. What's important is that flash detects if the mouse rolls over one of these attached "postit clips"....

rabidGadfly
July 24th, 2007, 11:46 PM
change the onPress in the example above to onRollOver and place the action you want to occur inside it.

Jt_01
July 25th, 2007, 04:50 AM
ok I'lll try it out.