• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

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
0
kugo
Asked:
kugo
1 Solution
 
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
0
 
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


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

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now