ActionScript 2.0 :: Duplicate Movie Clips Which Allow To Drag Every Movie Clip Duplicated?
Jan 29, 2010how to duplicate movie clips which allow me to drag every movie clip duplicated.
View 4 Replieshow to duplicate movie clips which allow me to drag every movie clip duplicated.
View 4 RepliesI have some movie clips. i want to drag all clips when i drag single movie clip. Ex. I have movie clips "A1", "A2", "A3", "A4", "A5" . Randomly visible some of them. Suppose "A1", "A3", "A4" has visible. When i will drag "A1" movie clip all these "A3", "A4" also move with "A1".
View 6 RepliesI just read a thread on how to duplicate a movie clip and drag and drop it with AS2. However, I keep getting a syntax error on line 3. Attached is the file.
View 1 Repliesvar mySelection = "";
var totalmc = 0;
var depth = 40;
[code].....
i have been trying to get this to work forever. What im doing here is making a flash site thats like a real time strategy game. You have to build stuff in order to unlock new sections of the site. check out this: [URL] click on build, then drag the Main button and release somewhere above. Notice that when you release it sticks to the cursor and doesnt stop dragging. Now, hit cancel and notice that the main clip is still loaded and works correctly if you drag and drop it.
[Code]...
I have several movie clips on the stage. They are draggable. I want to be able to drag the movie clip, then when it is dropped, a copy of that movie clip will appear where the first one had been, and the first one will just stay where it is on the screen.
However, I'm running into problems with the syntax.
Here is my current code:
[Code].....
Im working on a rock climbing game, and used duplicateMovieClip() to make all the snow. When the character gets to the top of the mountain, the movie goes to the next scene, but the duplicated snow is still there. Look through the .fla at [URL]
View 5 Repliesi am currently making a game , and for some reason the hittest on my duplicated movie clips isnt working i know how to do them , and know it should be working , because it works on one of the movie clips but none of the others so im guessing it something to do with depth?
View 2 RepliesHow do I change the y position for the duplicated movie clips I have created?This is the code I have used to create the movie clips. [code]
View 14 RepliesI am trying to create a hitTest between two duplicated objects. The code below is on a bullet. Bullets hit "bad" MCs that are called bad + x (X being a number from 22 - 40). I can't get it to work. I belive that I am not referencing the duplicated MCs correctly
Code:
for (x=22; x<42; x++) {
if (this.hitTest("_root.bad" + x)) {
[code].....
I used a tutorial from here, that creates snow, and changed it up a bit so that it now creates fizz in a soda. however I'm running into a snag.Is there any way to mask duplicated movieClips so that they only show up in a certain area? Or some way to set parameters to accomplish the same effect? (i.e. I want the bubbles to only appear in the area of the cup, and not all over the place).Right now I have just set X and Y values to do this, but the cup is angled and not square, so it doesn't looks quite right.I have tried setting a mask on a layer above which the duplicated movie clip sits, and also have tried setting the depth of a mask_mc so that it is well above any of the layers that the bubbles are generated on (by use of a for() loop), but nothing works.
View 2 RepliesI've created a tsunami menu made up of duplicated menu items. Each menu item should have a rollover and selected state of 240% which works fine. When a menu item has been selected it jumps to another frame but until the user interacts with it it should loop through the different categories.My problem is that I can't get the menu items to scale big while it is looping through the different categories on the matching category frames.
View 1 RepliesHow do I change the y position for the duplicated movie clips I have created?
This is the code I have used to create the movie clips.
var i = 1;
while (i <= 5){
duplicateMovieClip("bar", "bar" + i, 0);
i++;
}
On my stage I have generated a series of Movie Clips at runtime. They drift around in a semi-random motion, causing them to occasionally overlap each other - is there any way of preventing them from doing this?
View 3 RepliesI have the code tucked under a layer of some text, but the hearts end up covering up the text.
View 9 RepliesI am making a small game in which you are a little shooty spaceship type thing, and there are duplicated mines falling around you. When you press space, the shooty spaceship type thing fires duplicated bullets. How do I check a hittest between any bullet
View 3 RepliesI have a problem in loading pictures to duplicated movie clips. I have a dynamic sliding menu and I wanna load images to submenus. However I havent succeeded yet.
Here is the code:
setProperty("Rub", _visible, false);
setProperty("subrub", _visible, 0);
bas._visible=false
[Code].....
i am currently making a game, and for some reason the hittest on my duplicated movie clips isnt working i know how to do them , and know it should be working , because it works on one of the movie clips but none of the others so im guessing it something to do with depth? i will give the code if any1 replys
View 2 RepliesI have a fire animation that i want to freeze (ha!) on the last frame of my swf. So basically the fire is buring and i want all the tweened flames inside duplicated MC to stop so it looks like a snapshot of whereever all the flames currrently are.Everything else in the movie is stopped too, so i was wondering if there was a global stop all motion command or the best way to freeze my fire
View 2 RepliesI have some code that has hearts falling from top to bottom and randomly float off the screen. The problem is the layer order. I have the code tucked under a layer of some text, but the hearts end up covering up the text. So would this be a depth problem? What would be some code to tell the newly duplicated movie clips what layer to appear on(as in appear below the text layer in the timeline).
View 9 Replieswat i want to make.. is a graph plotter.. i add movie clips on the stage and a line should connect them all.. but im having a fkload of problems in solving that..here is the code for adding the movie clips.
function makeABox(e:Event):void {
var newBox:myMC = new myMC();
addChild(newBox);
[Code].....
I'm trying to make duplicated movie clips scroll down the screen (asteroids) for an experimental game but I just can't get it working. :-
I'm using this to duplicate the movieclip:
i=i+1;
duplicateMovieClip ("m0", "m", i);
and trying to get the movieclips to scroll down with this:
p=eval("m" add i);
p._y+=2;
make renamed duplications scroll down the screen?
I�d be grateful if anyone can answer what should be a simple problem. I�m building a Flash program that has many movie clips (like they all do). At one stage I need to duplicate a specific movie clip and make it appear in another movie clip.
PS: The movie clip needs to be added by actionscript as it is made on the fly in the program, hence it cant be in the original .fla file � if that makes sense.
What (if any) is the actual differance between removeMovieClip() and unloadMovie() for use in erasing duplicated movie clips (using duplicateMovieClip() )? I was looking over some of my code and noticed I used both without much rhyme or reason as to why one over the other.
View 4 Replieshow to attach a movie clip to another movie clip after drag and drop .I mean to say that is it possible to make a new movie clip with the target movie clip and dropped movie clip.
View 2 RepliesI have attached a duplicate movie script action on a button to create a new copy of the clip (F900) with each press. This seems to work well; however, I can not, for the life of me, figure out how to create the script to remove the duplicated movie clipHere is the script I am using for the duplication and I did also attach the fla file:on (release) { _root.F900.duplicateMovieClip ("F900_"+"x", x ); setProperty ("F900_"+"x", _x, 300);setProperty ("F900_"+"x", _y, 200); x++;}Once I figure this out I would like to add different aircraft to it but that is not terribly important right now.
View 6 RepliesI use this code on frame 1:
Code:
topEdge = 0
leftEdge = 0
rightEdge = 550; //length of stage, CHANGE THIS
[Code]....
and it works great, but the flakes get duplicated even when i go to frame 2. What I would like is code to get rid of the movie clip
I use this code on frame 1:[code]and it works great, but the flakes get duplicated even when i go to frame 2. What I would like is code to get rid of the movie clip.
View 10 Repliesso i need to load a MC into the clips made with
Code:
on (keyPress "a") {
duplicateMovieClip(_root.blank, "a" + k, k);
[code].....
I created a button that duplicates a movie clip, I want the user to be able to drag the duplicated movie clip. Right now, it duplicates the movie clip but when I try to drag it, it moves the first movie clip (the one being duplicated) instead of the one which was duplicated.
View 6 Replies