code for playing movieclips

OK, here is the problem: I have done a small movieclip called "clip_a10". After I have created a new flash document. In the library of this document I have included the clip_a10 movieclip. I want to "insert" the clip_a10 movieclip into the interface, but instead of dragging and dropping it into this interface i want to do it by code, because of programming issues. i have tried to use loadMovie(), playMovie() and other methods but for some reason none of these works. can someone give me an help on this?
many many thanks
K
kugoAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Dushan De SilvaTechnology ArchitectCommented:
loadMovie() is to load external flash movie files (swf files).
You try attcheMoive command.

eg:
 this.attachMovie(_backgroundMCName, "background_mc", -1,{_x:0, _y:0,_xscale:0,_yscale:0});

BR Dushan
Aneesh ChopraCommented:
Hi,

you can use "attachMovie"

1. To use attachMovie, first of all, right click in library and click "Linkage..."

2. Now check the "Export for Actionscript" checkbox, you will notice as you click, identifier textbox become enable and "clip_a10" have been filled automatically.

3. click Ok.

4. now you are ready to use this movieClip as attachMovie.

5. Write the following code to the first frame.
-------
_root.attachMovie("clip_a10","mc", _root.getNextHighestDepth());
--------

6. compile to test it.

more details on "attachMovie" is here
http://livedocs.macromedia.com/flash/8/main/00002440.html

Rgds
Aneesh


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
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.