[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


duplicating a movie clip but wanting the content to be unique

Posted on 2009-04-20
Medium Priority
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
  • 2
  • 2

Expert Comment

ID: 24189166
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

ID: 24189420
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..


Accepted Solution

Dreammonkey earned 750 total points
ID: 24189623
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

ID: 24189785
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses
Course of the Month19 days, 22 hours left to enroll

872 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