Creating a component preview
This article has been added to your 'Articles to Read' list.

Creating a component preview
Tolga Ozdemir
Tolga Ă–zdemir is professionally interested in the usage areas of the internet namely for education and for marketing. Both topics convey somehow the meaning of information engineering, to him. He is a flex/flash developer who has a view on designing but he is indifference to become a designer.
You can reach his writings on actionscript, internet marketing, and e-learning via his web site http://www.tolgaozdemir.net
-
Create a new Flash document and give a name it. I gave myPreview.fla
-
Resize it, I prefer a 50x50 scene.
-
Then plot a dynamic text and giv e it a name. Mine is txt_preview
-
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.
-
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!

