PDA

View Full Version : -=Move Movie Clip=-



Zeth
September 12th, 2003, 05:10 AM
Although this should be a breeze for someone such as myself... I can't seem to get a certain aspect to work...

I need to basically move/duplicate a currently existing movieclip into another dynamically created movieclip. All attempts thus far have failed :-\

::::::::::::::::::::::::::::::::

I tried a general duplicate movie clip method.

==
duplicateMovieClip("Close", "CloseButton", eval(WindowName+".TitleBar"));
==

This faultered as the duplication just occured on the root -_-

::::::::::::::::::::::::::::::::

I even attempted creating a null movie clip in one of my layers then swaping depth.

==
eval("_root."+WindowName + ".TitleBar").createEmptyMovieClip("closeholder", 1);
Close.swapDepths(eval(WindowName+".TitleBar.closeholder"));
==

In this case I'm probably using [and understanding] depths incorrectly. Basically I assumed depth/target/object were interchangable as in specification of a path... or a general depth.

::::::::::::::::::::::::::::::::

Any idea's on moving my movie clip around throughout other dynamic movieclips/objects? Im thinking I MIGHT have to specify the path as a variable then eval the var to associate properly... hmm.

Thanx in ahead,

~Zeth

Johnny64
September 12th, 2003, 03:56 PM
Hoi

Well a duplicated mc is place in the same place as the mc your duplicating.
If you what to put it in a mc you will have to put the main mc in here too and that can only be doen in flash and not in the player.
You can also use .attachMovie() and take it out of the library. and place it where you like. But don't forget to linkage it (if you don't know what linkage is look it up it the help).

There is a tut on depths http://www.umbc.edu/interactive/flash/tutorials/showpage.php?p=depths


;)