1. Create a new Flash document and give a name it. I gave myPreview.fla
  2. Resize it, I prefer a 50x50 scene.
  3. Then plot a dynamic text and giv e it a name. Mine is txt_preview
  4. Now, create an empty movieclip, then put it on the scene and give a name. It is not OPTIONAL, it is a MUST. Its name will be xch. This is our gateway.
  5. Finally put the code below on the first frame of your action layer, then publish your movie:

 

function onUpdate(){
     txt_preview.text = xch.Frame;
}



***

Now, we are ready for the second part. We add preview.swf to our component’s view. From the library panel, open our component definition window



You may see the Live preview option. Click the set button and then write the name of your preview swf file.



Then, click ok. Yes, you have done!