Well, I must admit I'm not sure if I understand exactly what you're trying to do. But as far as I can see it, you want: - create multiple clips (somehow) - make them follow after mouse (somehow)
If so I can suggest: 1) Just forget "normal" dragging (start/stopDrag) for this task. 2) When new clip is created, add it to some array OR just assign a recognizable name to it. BTW, currently all name seems the same, right? 3) Assign onMouseMove handler to PARENT clip (say, _root) and within this function loop through the array of newly created clips to change their positions. 4) Be aware of potential scope issues. 5) As to depths - use whatever you like: getNextHighestDepth, incremented/decremented counter or anything else, - it doesn't matter a lot :-). BTW, some places in code you've posted are very, very "strange"... I'd suggest that you show us some code/FLA to be more specific. And feel free to email questions offlist if you like. -- Best regards, GregoryN ================================ http://GOusable.com Flash components development. Usability services. > -------- Monicque Sharman wrote: > > After seriously days of trying to do this, I kept searching for onMouseMove > through google, and it is finally starting to work!!! > > Well, I've worked out how to use the onMouseMove anyway. It looks like this: > > > > nam.onPress = function( ) { > nam.startDrag(true); > nam.onMouseMove = function( ) { > updateAfterEvent( ); > }; > }; > nam.onMouseUp = function( ) { > delete nam.onMouseMove; > nam.stopDrag( ); > }; > > So thanks heaps for suggesting this, and sorry for posting before i found it > > > however, now the problem is that once clips are moved, I can't re-select > them.... But I have some ideas on how to do that. Any tips greatly > appreciated, but at least I have a starting point now! > So thanks, > Monicque. > > > > > > -------Original Message------- > > From: Monicque Sharman > Date: 02/22/06 05:08:50 > To: Flashcoders mailing list > Subject: Re: [Flashcoders] dragging multiple movieclips > > Thanks for your comments David and Gregory. > > When I tried using getNextHighestDepth(), it was getting the maximum depth > number (so not incrementing). So, I've tried using > getNextHighestDepth()-_count. > This works, giving the clips lower numbers every time. (Trying to just use > _count for the depth doesn't seem to work for some reason - it doesn't > increment (but when you use it with getNextHighestDepth() it does increment) > > .) > > However, When the next movie clip is selected from the combo box, and it > displays, when you go to click on it, and move the mouse, the previous clip > moves. (and the one you've just clicked on stays still.) > > I don't understand how to use the onMouseMove event. Don't I somewhere have > to use this.stopDrag() ?? I can't use that in the onMouseMove event. If I > take out this.startDrag() and this.stopDrag() then what is the alternative? > > Any help would be much appreciated. > Monicque. > > Code in frame relating to 'chooser' (my combobox): > > _global._count=10000; > > form = new Object(); > form.change = function (evt){ > > var item=evt.target.value; > _count++; > > createEmptyMovieClip("nam",getNextHighestDepth()-_count); > > nam.attachMovie(item,"item",getNextHighestDepth()-_count); > trace(nam.getDepth()); > nam._x=432; > nam._y=194; > > nam.onMouseDown=function() { > this.startDrag(); > _global.selcom=this; > } > nam.onMouseUp=function() { > this.visible=true; > this.stopDrag(); > } > } > chooser.addEventListener("change", form); > > > > _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

