duplicateMovieClip to parent

I have created a sub-stage(movie clip, it is actually a rectangle without fill) and a movie clip with instance name "box" on the main stage.

Inside the sub-stage, there is a button. I set the following script and wish the button can trigger duplicateMovieClip and generate a new movie clip on the main stage.

on (release) {
        //Can be done by attachMovie!!!
     //_parent.attachMovie("box","box2",2);
     //_parent.box2._x = 100;
     //_parent.box2._y = 200;

     _parent.box.duplicateMovieClip("_parent.box2",2);
     _parent.box2._x = 100;
}

I can do what I want by using attachMovie, but I don't know why I can't do this by duplicateMovieClip! Is there anything wrong with the notation? Or it is not possible to do that to the parent by using duplicateMovieClip?? Please advise..


ping1234Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

henrywwCommented:
i think u can only duplicate movieclips in the same container, same timeline .....

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ocgstylesCommented:
henryww is correct....  note that it only lasts for the current frame too.

-styles
0
henrywwCommented:
thanks for the confirmation O

how's it going with the chatroom ... ? it is open for public yet?

let me know when it is done, i will be a memeber too :)
cheers
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ocgstylesCommented:
Been a little busy the past week, haven't really had too much time...  the chat logic is there now, just need to make a nice environment for it.

i haven't been able to post too much stuff on here either... =(

-styles
0
henrywwCommented:
i know ... i haven't seen u around lately...
i was hoping u can give us a hand here ... :)
wanna see u in the top 15 soon ...
0
ocgstylesCommented:
right now it is 4:00.  i am freaking out because i have to go to court today!  :(

oh the stress....
0
henrywwCommented:
oh why ... what have u done???
told u not to mess with all the ladies u met at the bar.... and u don't listen.... sigh ....
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.