Thanks for the reply, but it's not that :-(
- I have a unique depth as this clip kind can only have one onject in it. I
tried changing that but as I guessed, no better result.
====== code ========
function affiche( N ){
removeMovieClip(1);
duplicateMovieClip( Album+".Contenu"+N, "Photo", 1 );
trace( N + " -> " + eval(Album+".Contenu"+N) );
trace( N + " -> " + eval( "Photo" ) );
}
==================
Album is a clip on another branch of the tree on level 1. It contains 10
clips witch contains photos loaded with loadMovie. Those clips are named
contenu0 up to Contenu9.
The clip where the function is has to show one of the photos, which index it
received as parameter.
I don't use attachMovie as I have several clips in the movie which may need
to show those pictures, and that those pictures may change. I have
Photo0.jpg up to Photo9.jpg in the same directory. The loadMovie let me also
have the first pictures loaded at the start of the movie, other ones (wich
could then be numerous) have time to be loaded during the time the user look
at the first ones.
Anyway I don't understand why the object "Photo" isn't created as the trace
shows as I even tried creating a clip "test" on _root, and tried
duplicateMovieClip( _root.test, "photo", 1 );
without success.
--
Pierre Alain
pie@lifnet.com
"mandingo" <webforumsuser@macromedia.com> a écrit dans le message de
news:c23527$16l$1@forums.macromedia.com...
[quoted text, click to view] > Hi,
>
> just a quick look at your code and one thing that is obviously missing is
a
> unique depth for each instance of the duplicated movieClip.
>
> also your format is possibly incorrect... it should be
target,newInstance,depth
>
> try:
>
> function affiche( N ){
> uniqueDepth++; // or use N if that is a unique integer being passed to
the
> function
> removeMovieClip(1);
> duplicateMovieClip( "Photo", Album+".Contenu"+N, uniqueDepth); //or N
> trace( N + " -> " + eval(Album+".Contenu"+N) );
> trace( N + " -> " + eval( "Photo" ) );
> }
>
> where Photo is the instance you are duplicating
>
> if this isn't what you want, let me know further... otherwise, you
probably
> aren't needing a duplicateMovieClip more an attachMovie
>
> hope that helps,
>