Tutorial: How to import design-elements in Flash
The use design-elements is very easy and powerfull. High quality results and filesize of your projects are no problem, while you are free to use them the way you like or wchich is necessary. In the following tutorial, we will explain the most common ways of implementing various elements in Flash. We used Flash8 for this tutorial so you can see how efficient the results are if you work with design-elements, but it works up to CS4 very well.First of all, you need to learn the two ways to import various elements into Flash:
1. Import direcly into Flash (import into libary)
With this method you import your element directly into Flash. It is the most common way and a requirement if you need the alpha-channel of an element to be transparent.
First of all you should open the libary-window (F11) and create a new movieclip, in which we will drop the element later.
Then you have to import your element, so click on File/Import/Import to Libary and choose the element you want to add. The element will be put in the libary after the import-process is completed.
If you use a PNG-sequence, you will have to open a movieclip by clicking on it first, and then Import into Timeline, so Flash catches the whole sequence. If you use a movie you have to click through the import-dialog, try out the best quality-configuration for import in Flash. You can read the detailed information about how to import PNG-sequences and MOV-files correctly here.

You are free to use your design-element now, but for a better control you should put design-elements in seperate movieclips. So open the empty movieclip you created in the libary by doubleclicking on it. Then drag-and-drop the design-element into the scene and align it as you like.
Now you are able to play this movieclip forward and backward for example or stop it, rewind it, transfer informations between this movieclip and other movieclips or just our AS-Code.
This method is very powefull when it comes to implement really largesized elements into a project. For example you have a nice background-movie which you like to play in a seemless-loop. The movie-file is too big, to import it directly into Flash so the compiled SWF is too big for the web.
You can stream AVI, Mpeg, MOV as well, but it's always better in flash, to prepare sources for streaming in Flash as FLV-Files. There is many software for this purpose on
the web, you will need to find one that you like and which fits you needs. Since CS3, Flash comes with an integrated converter which you also can use very well.
Like in the direct-import-method you should first create an empty "container"-movieclip, in which the element will be streamed, so you have more control over it
Then right-click into the free space in the libary and choose New Video
Doubleclick on the empty movieclip in the libary to open it and drop the videocontainer into it
While the dropped videocontainer in the scene is still selected (otherwise just click on it), give it an instance-name, for example "video"

In the root you can drop the movieclip, which is containing the video, into the scene and give it an instance-name, too ("video_mc")
Now you have to tell the "video" in the "video_mc" that it has to stream an extern source, so you have to put some AS-Code into a empty frame:
connection.connect(null);
var stream = new NetStream (connection);
video_mc.video.attachVideo(stream);
stream.play("yourfile.flv");
You can copy the above AS-Code and just change the souce in the last row.
Go back






