Skip to main content
Inspiring
May 3, 2013
Answered

duplicate movie clip problem

  • May 3, 2013
  • 1 reply
  • 730 views

I can't believe as simple as it may sound I needed help!

on stage:

#1 button1

#2 clipT ( this is what I want to copy)

#3 mc ( target mc that i want copy clipT to)

stop();

   

button1.onRelease = function () {

duplicateMovieClip (clipT, "clipT2", 0);

mc.attachMovie(clipT2);

}

it doesn't do anything, if I use mc.loadMovie(clipT2), it gives me error  cannot find **/**/***/***/level0.clipT2

whats going on?

This topic has been closed for replies.
Correct answer Ned Murphy

button1.onPress = function () {

var dupe = this.duplicateMovieClip("dupe", 1000, {_x:this._x, _y:this._y});

mc.attachMovie("dupe", "dupe2", 1000);

}

I don't understand, why it doesn't do the 'job', 'dupe' is a copy of 'button1', and 'mc' attach 'dupe' inside itself? what have i done wrong? there s no error, no output, but 'mc' doesn't change a thing


What you need to know is how to use the help documents - then you can help yourself be more sure of what things do and do not do. 

If you do what I said, you will find that attachMovie recreates a movieclip from the library, not the stage.  It uses a linkage that you assign in the properties panel.  It has no relationship with duplicateMovie or any object you might ccreate using it.

If you look up the duplicateMovieClip function then you will find examples of how to use it properly.

1 reply

Ned Murphy
Legend
May 3, 2013

You probably need to reasd the help documentation for the various functions you are trying to use so that you can see what they do and how they don't do what you are trying to get them to do.  Try some of the example from the help documents too so that you can see how they work.

Inspiring
May 3, 2013

hi, thanks

but that doesn't really help, becasue I need to know what should I be looking for, stick with duplicateMovieClip and attachMovie? or should i try different functions? I wasn't sure attachMovie is what I need to begin with.

both clipT and mc are on stage, I want to copy clipT and put the copy into mc.

It seem to me loadMovie only work with external movie clip.

Inspiring
May 3, 2013

button1.onPress = function () {

var dupe = this.duplicateMovieClip("dupe", 1000, {_x:this._x, _y:this._y});

mc.attachMovie("dupe", "dupe2", 1000);

}

I don't understand, why it doesn't do the 'job', 'dupe' is a copy of 'button1', and 'mc' attach 'dupe' inside itself? what have i done wrong? there s no error, no output, but 'mc' doesn't change a thing