# Using duplicateMovieClip on dynamically loaded JPG

**URL:** <https://forum.kirupa.com/t/using-duplicatemovieclip-on-dynamically-loaded-jpg/77064>\
**Category:** flash\
**Created:** [January 24, 2005, 10:46am UTC](https://forum.kirupa.com/t/using-duplicatemovieclip-on-dynamically-loaded-jpg/77064 "2005-01-24T10:46:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![manky](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@manky](https://forum.kirupa.com/u/manky)\
**Post date:** [January 24, 2005, 10:46am UTC](https://forum.kirupa.com/t/using-duplicatemovieclip-on-dynamically-loaded-jpg/77064/1 "2005-01-24T10:46:50Z")

</div>

I have the following code to dynamically load an external JPG into a movie clip which is called target\_mc, and get its width. As follows:

```auto

createEmptyMovieClip("target_mc", 0);
target_mc.loadMovie("images/dogs.jpg");
_root.onEnterFrame = function() {
	if (_root.target_mc.getBytesTotal() && _root.target_mc.getBytesLoaded() == _root.target_mc.getBytesTotal()) {
		trace(_root.target_mc._width);
		delete onEnterFrame;
	}
};

```

Now, I was hoping to be able to duplicate this image several times, using something like target\_mc.duplicateMovieClip(). Unfortunately, the duplicated clip doesn’t include the dynamically loaded JPG. ie, it makes a copy of a blank movieclip. Could anyone please give me some ideas? Thanks!
