The MovieSkin skin type allows you to use a movie clip symbol from your library as a model texture. However, using an external SWF file (rather than an internal clip) is considerably more difficult. The procedure also differs in Sandy 1.1 and Sandy 1.2.
You can find example source code for using an external SWF as a MovieSkin in the code repository's advanced examples folder.
Here are a few things to note:
When using an external SWF as a MovieSkin, you can't apply the skin until after the external SWF has loaded. Otherwise, the skin will just be blank. The examples in the repository show how/where to use a MovieSkin in the callback invoked after the extrernal SWF is successfully loaded.
The MovieSkin class requires Flash Player 8. It uses the BitmapData class, so it won't work in Flash Player 7.
In Sandy 1.1, you have to provide a movie clip instance to the MovieSkin constructor. Therefore, you have to handle the preloading of an external SWF yourself. You can use the MovieClipLoader class as shown in the ExternalMovieSkin11.as example in the code repository.
In Sandy 1.2, you can provide either a library symbol or an external
URL to the MovieSkin constructor. In the latter case, you must also listen for the SkinType.onUpdateEVENT, which is triggered when the external SWF has loaded, as shown in the ExternalMovieSkin12.as example in the code repository. (Sandy 1.2 handles the MovieClipLoader details for you and issues the event when loading is complete.)
The second parameter passed to the MovieSkin constructor determines whether the movie clip will animate. Pass true to disable animation (improves performance) and false to enable animation.
Flash security restrictions apply, so be sure to test with a SWF that is loading from the same domain. Once you figure that out, you can try to get it to work cross-domain using either cross-domain policy files or a proxy server.
Make sure the clip's content is aligned so that the registration point is at (0, 0). Otherwise, you might not see your clip content.
See the skinning tutorial on the Tutorials tab for general information on skins.
See Petit's Sandy 1.1 tutorial for information about skins, including MovieSkins.
See the FAQs on differences in Sandy 1.2 and how to upgrade your code from Sandy 1.1.
