Making the media controls ready for sharing
So far we have a good set of controls in a movie, but they're not going to be easy to reuse as they are. If you've done any of our other tutorials, you will know that our next step will be to share the resources for use in other files.
Using the "File > Save As..." command (Ctrl+Shift+S), save the test.fla file as media-controller.fla. This will be the file that we will get media controls from after we have finished this section.
You should now have two Flash MX files:
Where we did all our initial development and testing of our media controls.
The file that we will tidy up and get ready for sharing out our completed media controls to other Flash files.
From now on we are only working on the media-controller.fla file
Go back to your main timeline: the one with the sound and waveform graphics on it. Now delete all of the layers except the controller layer. Really. Do it. And delete all additional frames on the controller layer, leaving only frame 1.
And save it. We don't need those bits any longer. They were just for development. It's difficult to build media controllers without any media to control!
And we need to dump all of that media from the Library as well. So open the Library (F11) and let's get started. I deleted the sound resource, the sample GIF and the graphic we made from the GIF. That left all this stuff:
So I tidied it up a bit:
The next bit of preparation involves exporting our resources for runtime sharing (look it up in the online help, or check out our other tutorials). Right-click on the media-controls movie clip and select "Linkage..."
The Linkage Properties dialog opens. Fill it out like this:
Do the same to all resources in the Library. You will find that once you have set up one resource for runtime sharing, when you go to do the others, all of the fields will be filled in automatically. The Identifier text box will change to the name of each resource you export.
Save the file.
Do a quick test (Ctrl+Enter). This will create the media-controller.swf file for us. Have a look at the size of the media-controller.swf file: mine came out to 2,836 bytes! Not bad! And our site visitors will only have to download this sucker once.
Next up, I will demonstrate how to use the controls.
|» Level Advanced|
Rating: 8 Votes: 63
|Tim is a co-director of the Glasson Murray Group, providing quality graphic design, illustration, 3D visualisation, interactive environments, virtual reality, multimedia and website services.|
|Download the files used in this tutorial.|
|Download (2157 kb)|
|More help? Search our boards for quick answers!|