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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

duplicateMovieClip help

Status
Not open for further replies.

stillhanginon

Programmer
Joined
Mar 25, 2005
Messages
27
Location
US
Hi, I'm using Flash MX and here is what I'm tring to do,

I have a movie clip on stage:
picture_mc

I want to load a jpg from a file into it:
picture_mc.loadMovie("images/0.jpg");

Then I want to click on the loaded mc and duplicate it:
picture_mc.onMouseDown = function() {
picture_mc.duplicateMovieClip("duplicate_mc",1);

Lastly, click on the duplicated mc and move it:
duplicate_mc.onMouseDown = function() {
startDrag("root.duplicate_mc")
}

I'm able to load the jpg into the picture_mc, but once it is loaded I'm not able to do anything with it. Can anyone point me in the right direction? Thanks a lot.
Jim
 
Your onMouseDown function is wiped out as soon as your image is loaded in the picture_mc.

Load the picture in another nested container clip within the picture_mc. Thus the function set on the picture_mc will remain active and should now work.

Regards. CLICK HERE TO DONATE.

VISIT MY FORUM
TO GET YOUR OWN FREE WEBSITE HOSTING
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top