Hello,
My Name is Kamran Khan i am new in this site. I have a problem , i want to make a movie clip using the code of duplicate and random. Please tell me the simple and easy code of this.
I am waiting for your reply.
Duplicate and Random CodeI want to make a movie clip using the code of duplicate and random.
Page 1 of 1
4 Replies - 5271 Views - Last Post: 30 August 2006 - 06:26 PM
Replies To: Duplicate and Random Code
#2
Re: Duplicate and Random Code
Posted 29 August 2006 - 12:23 AM
to duplicate a movie clip you need to have at least 1 instance on the stage. It has to be named and, if not used, hidden.
you then use duplicateMovieClip( name, new name, depth ); function to make a copy.
Example:
Say you have a movieClip named foo on stage and you want to duplicate it and name it foo2...
How do you want the random part to come into effect?
you then use duplicateMovieClip( name, new name, depth ); function to make a copy.
Example:
Say you have a movieClip named foo on stage and you want to duplicate it and name it foo2...
duplicateMovieClip("foo", "foo2", 10);
How do you want the random part to come into effect?
#3
Re: Duplicate and Random Code
Posted 29 August 2006 - 03:24 AM
pioSko, on 29 Aug, 2006 - 12:23 AM, said:
to duplicate a movie clip you need to have at least 1 instance on the stage. It has to be named and, if not used, hidden.
you then use duplicateMovieClip( name, new name, depth ); function to make a copy.
Example:
Say you have a movieClip named foo on stage and you want to duplicate it and name it foo2...
How do you want the random part to come into effect?
you then use duplicateMovieClip( name, new name, depth ); function to make a copy.
Example:
Say you have a movieClip named foo on stage and you want to duplicate it and name it foo2...
duplicateMovieClip("foo", "foo2", 10);
How do you want the random part to come into effect?
Hello Sir,
Please explain the code i use the your way but it did`t work . I make a clip with the an instanse name of foo and give him a simple your suggested code. But it does not work. And also sir i want to make a duplicate movie clip. Please give me a good suggestion.
#4
Re: Duplicate and Random Code
Posted 30 August 2006 - 06:24 PM
Although I am new to Flash myself, I would guess that the code actually DID work. The only problem is that you have created the duplicate right on top of the original movie clip. If you add some code to move either of the movie clips you will see that there are now two instances on the stage. I tried this code:
var xmove:Number = 2;
duplicateMovieClip("foo", "foo2", 10);
onEnterFrame = function(){
foo2._x += xmove;
}
#5
Re: Duplicate and Random Code
Posted 30 August 2006 - 06:26 PM
Very nice smallfatguy, thanks for helping!
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|