The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 5 of 5

Thread: <<_attachMovieClip>> vs <<_duplicateMovieClip>>

  1. #1

    <<_attachMovieClip>> vs <<_duplicateMovieClip>>


    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 Advance
    Last edited by flashrockers; August 8th, 2006 at 01:31 PM.

  2. #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)

  3. #3
    they do different things.
    movieclip.duplicateMovieClip("newName", depth, {params});
    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.

    target.attachMovie("linkage", "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.

    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..

  4. #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..

  5. #5
    What if you need to attach a duplicated movieClip?

    Can you link a duplicated MC to your library?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012