Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to duplicate already loaded JPEGS

Status
Not open for further replies.

ilanium7

Programmer
Oct 10, 2005
2
0
0
NZ
Quite simple question. When I try to run the code below, the frontImage_mc does replicate as an object, but withouth the JPEG file that was loaded to it.

Is that the same thing as with variables from original movie not being cloned in the duplicate movie or is it something else!

Thanks for any input on that!

Lovro

-----

photo_url = "
this.createEmptyMovieClip("frontImage_mc", this.getNextHighestDepth());
frontImage_mc.createEmptyMovieClip("imageContainer_mc", this.getNextHighestDepth());

var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.loadClip(photo_url, frontImage_mc.imageContainer_mc);

frontImage_mc.duplicateMovieClip("backImage_mc", getNextHighestDepth());

backImage_mc._x = 200;
backImage_mc._y = 200;
 
You cannot duplicate dynamically loaded JPEG, so the easiest way is to load it into a new MC again. (There's a known work-around (load JPEG in a nested MC then dupe) but that doesn't work for me.)

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top