Attaching a movie clip.

Before you can refer to a movie clip with ActionScript, you must right-click the movie in the library, choose LINKAGE and check the box to use it with ActionScript. It's easiest to keep the linkage name the same as the clip name.

Example:

var pickshow:MovieCip;
var chooseShow:Number;
chooseShow = Math.floor(Math.random()*3+1);
if (chooseShow==1)
   pickShow.attachMovie("mcClownSHow","TVShow",pickShow.getNextHighestDepth());
else if (chooseShow==2)
   pickShow.attachMovie("mcTalkSHow","TVShow",pickShow.getNextHighestDepth());
etc...

Once the movie clip is attached (it will appear at position 0,0) you can change its properties:

When you want to remove the clip use pickShow.removeMovieClip()