Live Preview

Hello,

I’m working on a actionscript 3 project for my study which requires me to make use of live preview. I have a component with a few parameters that will show a .swf file on the stage and allows the user to scale it. For this it would be very neat if I could use live preview to show the user of the component I’m making how the flash would be displayed without running the movie all the time.

Now, my problem starts when trying to show the live preview flash file. Because my component has a width & height of 1x1px it will not show the live preview file because its size is so small. I solved this by adding a movieclip with a large size in the component and setting it’s alpha to 0, this way it won’t show up but it makes the component large enough to show the preview.

Next, I have the problem with component I need to export for live preview. I can export it as .swc (as read in this documentation http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/livepreview/LivePreviewParent.html) and get the .swf file out of it so I can use that, but it doesn’t work somehow. I think the problem here is that I have no onUpdate() function or anything to update the file, also I can’t see inside .swf files that have it working to see how they work.

Now, the other option from the url above will not work either. I run into trouble setting the document class, because flash thinks I’m defining an external class (not one that’s in flash’ library).

I tested live preview using a file that contains just a movie, and that will show up in flash, so the preview itself is functioning.

I really hope someone can help me, thanks in advance!