Results 1 to 5 of 5
-
August 8th, 2006, 12:47 PM #1
<<_attachMovieClip>> vs <<_duplicateMovieClip>>
HI,
ANYONE CAN HELP ME TO TELL THAT IF IT IS WISE TO USE _attachMovie or _duplicateMovieClip in a game.Actually I am creating a vertical shooter game in which the missile will fall in the vertical direction from the top 2 d bottom-line in certain Intervals.It is this where I need to attach or duplicate d _mc...So anyone can help me out in using the right 1..
Thanx in AdvanceLast edited by flashrockers; August 8th, 2006 at 01:31 PM.
-
August 8th, 2006, 08:00 PM #2
i would use attachMovie coz that way you do not need one on the stage to start with
so that's
_root.attachMovie("linkige name", "new instens name", depth)
-
August 8th, 2006, 11:46 PM #3
they do different things.
Will just copy an already existing instance, and create a new instance of it, carrying with it any coded nested on or within the duplicated one. It will create it on the same location as the already existing one; ie same movieclip or whatever and in the same position as the one being duplicated by default.Code:movieclip.duplicateMovieClip("newName", depth, {params});
Will just create a new one of the object in the library via it's linkage identifier. With this code you can create a new instance of that object an any movie clip etc depending on where you have specified and the position 0,0 of it's parent by default.Code:target.attachMovie("linkage", "newName", depth, {params});
So, duplicateMovieClip would be easier for copying same-level objects because you will not have the need for as many parameters, linkage IDs etc.. but you will needattachMovie for creating the same object on multiple layers in multiple targets. Though, you can use either, there's no right or wrong, just depends on what you feel like using or what you are comfortable with.. though sometimes you have no choice to use on or the other..
-
August 9th, 2006, 04:23 AM #4
hey Nathan thanx,for replying.I really appreciate dat .I hav seen a lots of posts of yours in the Game AI Section..It really inspires me of being like u 1 day..
-
September 25th, 2006, 05:55 AM #5



Reply With Quote


Bookmarks