Duplicating movieclips & Making draggable?

Okies, here it is folks…

firstly, plz accept my lack of Flash knowledge, I am basically trying to duplicate a movieclip by using a button… (no probs there).

however, i want to drag each movie clip individually… ( my brain froze)

Can anyone plz help me out?
here is my butchered code…
// graphic is the mc i wanna drag, n is the textfield that i want to count up.

on (press) {
addmore = “graphic” add n;
duplicateMovieClip(“graphic”, addmore, n);

n = Number(n)+1;
set(addmore add ":n", n);

// i tried the following, .... no luck
// myMovieClip .startDrag(true);

}

Any takers??
:beam: Thanks…

This is the code i just made:
[AS]
_root.box.onRelease = function() {
duplicateMovieClip(_root.box, “newbox”, 1);
setProperty(“newbox”, _x, 0);
_root.newbox.onPress = function() {
startDrag(newbox, true);
};
_root.newbox.onRelease = function() {
stopDrag();
};
};
[/AS]

box is the instance of the already made thing, and i called the duplicated box ‘newbox’. THis should be what you need :slight_smile:

:slight_smile: thanks a heap Blah!.
i really appreciate ur time!

I am jus gonna check it… :chinaman:

I tried ur code. Works nice, but I need to create or delete the box’s. bascally, I want to add or minus boxes and be able to position in a room.
When i try it, it replicates just once .
is this the right usage?..

on (release) {
_root.box.onRelease = function() {
duplicateMovieClip(_root.box, “newbox”, 5);
setProperty(“newbox”, _x, 0);
_root.newbox.onPress = function() {
startDrag(newbox, true);
};
_root.newbox.onRelease = function() {
stopDrag();
};
};
}

Thanks in advance…
:beam: [SIZE=1]

do you want it to add boxes automatically or somethign? or like when you press a button? not really sure what you want :confused:

here’s the basics … :slight_smile:
Imagine an overview of a room. I want to add objects in the room, ie tables, sofa’s etc.
there will be a + or - button for all objects in the room, to add more or delete the number of objects.
All objects, tables sofa’s etc need to be able to drop & drag where u like in the room.

I have the action to make the room whatever size needed, and drop & drag onto an object, but this is hurting my noodle a bit. I am trying to create a virtual room.

I want to upload this once done, as i think it will benefit a lotta ppl like me.

Thanks 4 ur interest again!.. (-:

why do you need add and minus buttons if you have drag and drop?

This is what i think you want:

you want a selection of items in like a box, and a room next to it. You can then pull items from that box and drop them on the room is this correct?

:slight_smile:
Thanks, thats a A much better way to do it… like i said ima bit of a flash doofus.

I got the duplicate & drag nice jus then, minus still to come, but ur idea is a much better method. So yeah, have a box of objects, which u can drag into a floorplan, to be able visualize, say what a function would look like… Ie “I have 100 guests, my room is 20m x 10m , therefore if i drag in 10 tables (to scale) and 3 sofas i can visualize the room space”

thanks again!.
U r a legend! (-:

sorry i’m confused :confused: but i’ll see if i can make the way i said before, and we’ll make changes after that alright? oh yea btw, do you want a fixed number of objects you can drag? so like maximum 3 sofas until they’re all used up?

Hi Blah,
Sorry 2 confuse u…
U r pretty much have the concept correct.
So, we have a box (room) on the left… On the right we have a “store” box of draggable-addon items ( with table/sofa/stage etc).
We want to drag a sofa from our 'store" onto our “room” so we can get a visual reference of “virtual space”
I think the idea of "only a few amount of certain items (like sof’s) would be an advantage, but not on all items.

.:®:. hands Blah a virtual beer. :slight_smile:

heh alrite…i’ll see if i can get one to work :confused: SHouldn’t be within an hour though cause i’m workin on some homework but i’ll get it as soon as possible :slight_smile:

Thanks m8!
If I can give u any skills I have let me know, ie 3d etc…
I 2 am afk 4 a few hrs, so any reply would be gr8!. grab my email @ ur leisure if needed…

thanks… :crazy:

Oh well here it is, it was harder than i expected :-\ So then i had to get help from other people from this board, and lots of the code was thanks to kax :slight_smile:

anyways, heres your code. The getbounds thing sorta works and sorta doesn’t, but i’m too sleepy so i’ll just post the fla now.

hey Thanks A Bunch Blah & Kax …
okies, I have a similar working, but mine is on press, not bounds. This is gonna go a long way, so i will post it up as a tute in a few weeks when finished.

Take care guys & thanks 2 all!..
:chinaman:

bounds? How is yours done with just on press? getbounds just gets the area where it can drop the box…oh well, anyways no problem :slight_smile: