duplicating a movie clip but wanting the content to be unique

Posted on 2009-04-20
Last Modified: 2013-11-11

I have a movie clip that has several movie clips inside itself.

This movie clip accesses an XML file and that contains data about pictures and text that the movie clip displays.

I want TWO of these movie clips to play at the same time in my flash movie. I would like to possibly change the data in one of the two clips to read different text and pictures possibly from a SECOND XML file.

The PROBLEM is when I change the code in one of my Movie Clips it changes in the other one (possibly due to the "Instance of").

Is there a QUICK WAY to duplicate a movie clip with data inside and COMPLETELY severe the ties to the copied movie clip?? So I can change the data inside (in this case several movie clips inside the primary one) without it changing the "original master" clip?

As little coding as possible would be great. I just purely would like to right-click the movie clip and duplicate it and actually have a UNIQUE DUPLICATE that doesn't update the original when I make changes.
Question by:kajbjo
    LVL 8

    Expert Comment

    This shouldn't be hard to do, but you'll need to be more specific on what you have on stage, in your code and in the library.

    I presume you are using as2 ?
    Is the MC you want to have duplicated on the time line when the movie loads, or is it added to the stage through code (dynamically)?

    In both cases can you provide the code you have now?

    Are you already loading data through XML, if this is the case, the script should be rewritten so that you can call a different URL (to an XML file)  for each instance of the movieclip...

    Catch you later...


    Author Comment

    Lets ignore the XML for now.

    The Movie Clips are on the timeline - not loaded through code. Yes I'm using AS2.
    To put it simply:

    I want to know if there is a way to make a copy or duplicate a Movie Clip and make it unique (nothing inside it being an INSTANCE of something else)? The reason being .. some movie clips can be quite complex and you want one exactly the same but you want to change properties in it.. maybe LOTS of properties.. colors, animation .. everything..

    You can do that with base objects like text objects or other objects BEFORE you make them into movie clips or similar symbols. After you convert them - seemingly everything is an instance of something. I want a copy that's UNIQUE.

    Having to create two movie clips FROM SCRATCH to have them be ALMOST identical seems insane..

    LVL 8

    Accepted Solution

    Insane is the game we play

    If you want this done, you will need to start writing some code I'm afraid.

    The mc's are on the time line, that's cool, I presume you gave them different instance names?

    Is there code attached to the movieclip?

    Anything is possible, you just have to take the right approach.
    when you have an idea about something it' s best to draw some sort of blue print (in your head, on paper, notepad, whatever) before you start coding/designing). That way chances are you won't have to put up with workarounds, instead you can go straight to your goal.

    The way I would structure your project is this :

    don't go for the time line approach, design the movieclip the way you want it to look like, but make it DYNAMIC that's the only way you can tell different instances of it to load/do different things.

    Look at it this way:

    say your only goal is that the movieclips load one picture each. When you write all the code inside of the mc you will not be able to let them load a different picture (unless you make them two different mc's)

    Are you familiar with OOP , classes ? as3 is all about that, but it can be done in as2 as well, you should check it out.

    For now (until you provide some code, files, or whatever) I can see 1 solution :

    go into your library, select your mc, right click on it (windows) dupilicate the bastard, give it a different name, from there one, tell it to do whatever you want it to do.

    I hope you're getting all this, post some code/fla, and we'll get to a solution, I'm sure


    Author Comment

    I see.

    Well I decided to try something different.

    I compiled my Movie Clip into a .SWF instead and load it using loadMovieNum. The .SWF had no issues accessing the XML file simultaneously too feed pictures and text  to the "movie clip" or in this case .SWF dynamically.

    I see what you mean. I'm going to start trying to code .. "the way you're supposed to" dynamically creating everything. Seems a bit steep of a learning curve but I can start doing some things like that until it sticks I guess.
    	if(this.containerleft == Number(this.containerleft)){
    	} else {

    Open in new window


    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
    Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
    In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
    The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now