Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-14-2006, 08:51 PM   #1
tusat
Registered User
 
Join Date: Nov 2006
Posts: 6
Default I have some problem with duplicateMovieClip and loadMovie

When i use this code

Quote:
_root.createEmptyMovieClip("test",_root.getNextHig hestDepth());

//ON A BUTTON
on(release)
{
duplicateMovieClip(_root.test,"test2",_root.getNex tHighestDepth());
trace(test2);
}
Output is "_level0.test2" -> it's ok.

But when i used this code

Quote:
_root.createEmptyMovieClip("test",_root.getNextHig hestDepth());
_root.test.loadMovie('cow.swf');

//ON A BUTTON, USED FOR LOAD FILE SWF COMPLETED
on(release)
{
duplicateMovieClip(_root.test,"test2",_root.getNex tHighestDepth());
trace(test2);
}
Now Output is "undefined" !!!

Anything wrong ? Please help me.
tusat is offline   Reply With Quote
Old 11-14-2006, 10:46 PM   #2
tusat
Registered User
 
Join Date: Nov 2006
Posts: 6
Default

Nobody can help me ?
tusat is offline   Reply With Quote
Old 11-15-2006, 04:48 AM   #3
mary_ftech
Registered User
 
Join Date: Aug 2006
Location: India
Posts: 74
Smile try this now it will work

_root.createEmptyMovieClip("test", _root.getNextHighestDepth());
_root["test"].createEmptyMovieClip("hold", _root.getNextHighestDepth());
_root.test["hold"].loadMovie('cow.swf');
mary_ftech is offline   Reply With Quote
Old 11-15-2006, 08:29 AM   #4
tusat
Registered User
 
Join Date: Nov 2006
Posts: 6
Default

Thanks for reply.

But the code dublicateMoveClip will create only a emptyMovieClip name "test2", not include movieclip "hold" and "cow.swf".
I want the code which can clone "test" to "test2" include anything in "test".

Anybody can help me ?
tusat is offline   Reply With Quote
Old 11-22-2006, 06:28 PM   #5
tusat
Registered User
 
Join Date: Nov 2006
Posts: 6
Default

here is the source.
Plz help me
Attached Files
File Type: zip problem.zip (12.4 KB, 126 views)
tusat is offline   Reply With Quote
Old 03-14-2007, 05:31 PM   #6
finksmart
Registered User
 
Join Date: Apr 2004
Posts: 48
Default

duplicateMovieClip() won't duplicate a movie clip containing dynamically loaded content using loadMovie() or MovieClipLoader() class's loadClip() methods. But with Flash 8, you can use the BitmapData() class to attach the property of your movie clip, essentially the content, to another movie clip using attachBitmap(). Go check out my blog I just put up a post with sample code I don't want to repeat here.
finksmart is offline   Reply With Quote
Old 08-19-2007, 04:47 PM   #7
alexandre_lab
Registered User
 
alexandre_lab's Avatar
 
Join Date: Jun 2002
Location: brussels
Posts: 220
Default

hello,

quite interesting. I tried with an image, and it works. I tried with a scripted animation in an external swf, but this time, could not make it work.
alexandre_lab is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DuplicateMovieClip and LoadMovie sanketsahu ActionScript 2.0 1 03-24-2006 05:29 AM
duplicateMovieClip and loadMovie nchagial ActionScript 2.0 1 12-09-2005 04:06 PM
LoadMovie, DuplicateMovieClip & Caching jeedee ActionScript 2.0 10 03-04-2005 09:05 AM
loadmovie and duplicatemovieclip prob dragonsteve ActionScript 1.0 (and below) 1 10-06-2002 08:15 AM
duplicateMovieClip after loadMovie tilchin_sergey ActionScript 1.0 (and below) 2 07-31-2001 04:06 AM


All times are GMT. The time now is 06:44 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.