Newsletter: Learn More ||| Multimedia Presentation Software |||
Preparing Linx Files for Streaming on the Internet
Contents
Top
Introduction
Linx provides functionality that you can use to optimize your output .swf files for web streaming.

Just to clarify, .swf files (which Linx exports) do not technically stream – they use what is known as “progressive download”. This means that the file downloads to the viewer’s computer as it plays – it is cached on the viewer’s computer. However, as long as your files conform to the viewer’s connection speed (the file is the appropriate file size for the viewer’s internet connection speed) the file will play uninterrupted – so for the viewer it is indistinguishable from streaming.

If you don’t want your files to be cached on the viewer’s computer, there is code you can place in your HTML to prevent caching. For more information on that, check out these links:
http://www.macromedia.com/support/flash/ts/documents/prevent_caching.htm
http://www.macromedia.com/support/flash/ts/documents/no_caching.htm

If you are outputting your project to be played from a CD or a local hard drive, you don’t have to worry about whether the file will stream (though you do have other concerns that are covered below). But if you want to post your output .swf file on the Internet for others to view, you have to take into account the way your output will play for viewers on different speed connections.

There is a little bit of an art form to preparing Linx output files for streaming, but in a nutshell it comes down to 2 key factors:
  1. the Linx play modes you select
  2. file size
Top
Play Modes
When you import a file into Linx, there are three different available play modes:
  • Play on the main timeline
  • Play independently in a sprite
  • Play with LoadMovie

    You must select one of the three.
Quick Answer: Which play mode should I use?

There is a quick answer that you can use if you don’t want to delve too deeply into what the different play modes in Linx do and how they work:

  • If your imported file is larger than 50KB and smaller than 2 MB set it to the “Play on the main timeline” play mode.
  • If your imported file is larger than 2 MB set it to the “Play with LoadMovie” play mode.
  • If your imported file is smaller than 50KB set it to the “Play independently in a sprite” play mode.
(If you are importing audio or image files for Linx to convert to .swf the size of the file referred to above is the size of the .swf file created once the file is imported – not the size of the source file.)
Changing the play mode
Files that you import into Linx by dragging them onto the interface, or by right-clicking on the Linx timeline are automatically set to play in the default play mode.

Dragging a file into Linx.
Right-clicking on an empty space in the Linx timeline:
In the Import menu item you can import a file and set it to play to any of the three play modes.
You may change the play mode of a .swf in Linx at any time in either the Play tab of the .swf properties window
or by right clicking on the .swf in the Linx timeline and selecting the option you want.
You can change the default play mode settings of imported files in the Options window (View>Options).
What are the play modes?
Linx's three play modes each have different characteristics and can be used for different purposes based on what you are trying to create. (Keep in mind that certain features in Linx and certain types of .swf’s that you import require specific play modes for them to work.)
 
Using Linx's Play Modes
Play on the main timeline
Play independently in a sprite
Play with Load Movie
Use with .swf's of size?
Over 50KB
Under 50KB
Over 50KB. Recommended for files larger than 2 MB.
Does the .swf stream or preload 100%?
Streams
Does not stream. Preloads 100%.
Streams
Is the .swf part of or external to the Linx project?
Internal
Internal
External file that is loaded into the main file.
Mouse-overs are enabled?
No
Yes
No
Actions in .swf affect the main timeline?
Yes
No
Yes
.swf's loop automatically?
No
Yes
No
.swf's can be reused without increasing final file size
No
Yes
No
What is the main timeline?
Linx’s play modes reflect the three different ways Linx can set imported files to play in your output .swf file and they have to do with how the Flash player plays Flash movies. This reflects the Flash’s background as a frame-based animation format that uses sprites (more on this below). Every Flash movie has a main timeline which represents the internal timeline of the .swf file you are creating (this is not the same as the physical Linx timeline in the Main window). You can place .swf’s onto the main timeline for playback. You can also play .swf’s in a sprite which is in the .swf file you are creating, but plays independently of the main timeline. And you can also load external .swf’s into your project (.swf’s played with LoadMovie are also independent of the main timeline).
Linx's three play modes
Play on main timeline
This option will cause imported files to be played on your .swf output’s main timeline. Files played on the main timeline will stream when posted on the Web (this is not an issue for files played from CD or your hard drive).

You should be aware that any actions in a file played on the main timeline will affect the entire project you are creating. For instance, if there is a stop action at the end of a file you import onto the main timeline, it will stop the entire project when the Flash player reaches that stop action. Likewise, if there is a loop at the end of the file, it will cause your whole movie to loop and so on. You may remove the stop or loop actions from the last frame of an imported Flash file using the "remove stop/loop action from last frame" options in the Play tab of the .swf Properties window.

Using image fade in and/or image fade-out with certain .swf’s set to the main timeline play mode may result in increasing file size. If this occurs you may want to use either the sprite or LoadMovie play modes.
Another factor to consider is that if you layer multiple files set to the “Play on main timeline” play mode on top of each other, they may have elements which conflict with one another. In this case you will then have to change one or more of the files’ play modes.
Play independently (sprite)
This option will cause imported files to be played independently in what is known as a sprite. While files played in a sprite are incorporated into the .swf file you are creating (they are not external), they do not affect any other file in your Linx project – they play independently. This means that if those files loop or contain stop actions, those actions will only affect that .swf, and not the main project or any other files in the project.

You should be aware that files played independently in a sprite do not stream when posted on the Web, they preload 100% - which means they must download completely before they begin to play (this is not an issue for files played locally). This is fine for small files, like still images or text effects, however, it may be an issue with larger Flash files, such as video and audio, because the end user will have to wait for the entire .swf to download before it starts to play. If you want those larger files to stream on the Internet, you should use one of the other two play modes.

Another thing to keep in mind is that certain features in Linx can only be applied to files set to play independently in a sprite - such as the mouse over option.
One of the great things about sprites is that they can be reused. In other words you can use the same file again and again without increasing the final file size of your output. To reuse a sprite, simply drag it into your Linx project from the Linx Library.
y
Play with LoadMovie
This option will cause imported files to be played using LoadMovie. This method can be used to load external .swf’s into your project. Files played using LoadMovie will stream when posted on the Web (this is not an issue for files played locally). This can be a useful way to play Flash video and audio files that you want to stream because they will not stream when played independently in a sprite.

Loading files into your project is also an excellent way to get around the .swf format’s 16,000 frame limit and the ram consumption problems associated with very large Flash files. You can load an unlimited number of .swf files into your project. However, files played with LoadMovie are not included in your Linx output itself, so you need to remember to have those other files available in the directory you specified, when you want to play your output.
Regardless of which play mode you select, all the files you import into Linx will appear in the Linx preview pane of the Main window and can be moved, resized and cropped in the preview pane. They will also appear on the Linx timeline in the Main window, but keep in mind that the Linx timeline is not the same as the internal "main timeline" of the .swf file you are creating.
Top
File Size
When creating a Linx project you have to keep in mind the size of the imported .swf files as well as the size of your total project, and there are several ways to reduce the size of your imported files and your final output.
Fades
Using image fade in and/or image fade-out with certain .swf’s set to the main timeline play mode may result in increasing file size. If this occurs you may want to use either the sprite or LoadMovie play modes.
Audio
Linx can directly import .wav and .mp3 audio files and will convert them to .swf. When you import audio files Linx will give you a number of options for encoding. If you want the project to stream for virtually everyone, we recommend setting the import settings to 22khz sampling rate and 40kbps bitrate. This will create reasonably good quality audio that plays without interruption for listeners on any connection that is 56k and faster. However, if reducing file size is a major concern, you can reduce the settings down to 11khz and 8kbps, which will yield the smallest possible file size. The higher the bitrate the larger the file gets. You may also consider encoding the audio at two different settings – one for listeners on a dial up and one for listeners on a broadband connection. 44 khz sampling rate and 128kbps bitrate is generally accepted to be CD quality audio.
Video
While Linx does not convert existing video files to Flash, it can import video .swf files from programs such as Flix and Macromedia Flash. We generally recommend encoding your video at two different settings – one for viewers on a dial up and one for viewers on a broadband connection. While you can’t adjust the size of an imported video, you can add a preloader to a video and then play it using the LoadMovie play mode. (For more information on preloaders, see below.)
 
Images
Linx directly imports most image formats (such as .jpeg, .bmp, .tif, etc.).
You can reduce file size by reducing the quality setting when you import the images.
We recommend setting the quality between 30-50. As the image quality setting increases, file size increases dramatically.
Wild FX Effects
Wild FX’s Flash 4 (Dynamic) and Custom effects are smaller than the Flash 3 (Standard) effects. If you are using a Flash 3 (standard) effect, you can use the “export as Flash 4” (or “export Standard as Dynamic”) option to reduce the size of the effect.

Another thing to keep in mind is that Wild FX reuses the same letters created with the same font – because they are in sprites. So if you need multiple lines of text, you can reduce file size by creating multiple lines in the same Wild FX output .swf and repositioning them in Linx.
Reuse sprites whenever possible
Any file you have set to the “Play independently in a sprite” play mode can be reused without adding to the final size of your Linx output. In other words you can use the same file again and again without increasing the final file size of your output. To reuse a sprite, simply drag it into your Linx project from the Linx Library. This is part of how the Flash format was designed.

While you can’t make an imported .swf file smaller in file size, there are a number of things you can do to improve the way it plays that mainly have to do with the play mode you select, the ability to use preloaders, and the ability to reuse sprites.
Top
Actions in your imported files
Any actions in a file set to the Play on main timeline play mode will affect the entire project you are creating. For instance, if there is a stop action at the end of a file you import, it will stop the entire project when the Flash player reaches that stop action. Likewise, if there is a loop at the end of the file, it will cause your whole movie to loop and so on. You may remove the stop or loop actions from the last frame of an imported Flash file using the "remove stop/loop action from last frame" options in the Play tab of the .swf Properties window. If there are other actions affecting your project you may need to use the Play independently in a sprite play mode.

Another factor to consider is that if you layer multiple files set to the “Play on main timeline” play mode on top of each other, they may have elements which conflict with one another. In this case you will then have to change one or more of the files play modes.
Top
Preloaders
Linx has a very useful feature that enables you to automatically add a preloader to your output files.

The Preload option allows you to program an automatic preloader into your Linx output. This is for web streaming purposes only. Preloaders will not work on Linx .swf’s played locally from a hard drive or CD. The purpose of using preloaders is to ensure smooth playback of larger .swf’s for viewers on slower connections. In this way, users on slower speed connections (e.g., dial up modems) can view larger .swf files without buffering or the .swf stopping and starting. For instance, if someone on a 56k connection tries to view a .swf that was created to stream to a broadband, 256k connection, the .swf is still going to play, but the amount of information contained in the .swf will be much larger than it would be for a .swf specifically created for a 56k connection. This will cause an inconsistent and choppy playback experience for the 56k user. The purpose of a preloader is to ensure that enough of the .swf has loaded so that there will be no interruption once the .swf begins to play. While there is a delay while the user waits for the .swf to begin playback, if you preload enough of the file, once it starts to play, it will continue to play uninterrupted until it finishes.

The preloaders have a "__% loaded" indicator that shows how much of the .swf has loaded until the specified percentage has loaded and then the .swf begins to play.

There are two types of preloaders included in Linx:

Fixed
A fixed preloader causes the Flash Player to preload a specified percentage of your Linx output prior to beginning playback. You specify the percent of the movie to load (from 1% - 100%). The Fixed preloader works with any Flash player version 4 and higher.
Adaptive

An adaptive preloader is an "intelligent" preloader that will preload a variable amount of your .swf based on the size of the .swf and the viewer's internet connection speed so that the viewer can watch the .swf without stops and starts - no matter what speed at which they are connected to the internet. The adaptive preloader determines the user's connection speed and based on that figure and the size of the .swf file you are preloading, it preloads precisely the amount of the .swf required to enable the .swf to begin playing as soon as it possibly can and still not stop at any point until it is done. In this way, the preload process is optimized so the amount of time taken for a .swf to preload is minimized as much as possible. The Adaptive preloader works with any Flash player version 5 and higher.

Buffer factor: The buffer factor will cause the preloader to preload more (or less) of the .swf than the initial calculations determine is the minimum amount of time required. This is useful because a viewer's connection speed often varies, even during the course of watching a single .swf. The time needed to load the .swf file to the end is multiplied with this factor. If you don't want to use a buffer you set the factor to 1.0 (a factor of 1.0 means no buffer - loadingTime * 1.0 = loadingTime). To be on the safe side, you may want to use a factor larger than 1.0. If you think the viewer's connection will get faster during the visit (e.g., perhaps a download ends) then you can change the buffer factor to a number smaller than 1.0. If you think the viewer's connection will get slower during the visit (e.g., because the viewer starts a new download) you should change the buffer factor to a number greater than 1.0. As a general rule, it is a good idea to make the buffer factor larger than 1.0 to be on the safe side. The default value is 1.1 which should provide good results. The buffer factor can be a number from 0 - 2 in increments of 0.1

Sprites and preloaders
If you have files set to the play independently in a sprite mode, those files will preload 100% before playing and adding a preloader will not affect them – and the preloading “__%” indicator will not work. This is because any file played in a sprite preloads completely before playing. If you have a series of sprites in your project each sprite will preload 100% and then play – but it won't wait for all the other sprites to preload before playing. So using the sprite mode can be fine for a series of small files.
Top
Exporting to CD or Hard Drive
Because of the way Flash works, when you have a .swf on CD (or a .swf as part of a Flash projector), the Flash player loads the entire file into memory before it starts to play. So, depending on your computer's speed, ram, CD player speed, etc. your performance may vary. Consequently, we suggest not creating files larger than 10-25MB for use on a CD Rom. You can get around this limit by chaining a series of smaller .swf’s together and loading them sequentially using Linx’s “LoadMovie” play mode (keep in mind that you will have a brief lag each time you load a new swf).

Linx can automatically output projectors for both Win and Mac. However, be aware that the Mac projectors created in Linx compressed and need to be expanded on a Mac prior to running. (Also, for Macs, you need to allocate enough RAM to your projector. All Mac OSs prior to OSX will not automatically allocate enough RAM. When preparing a CD-ROM, the projector file needs to be allocated it's own size plus the biggest Flix file plus a couple of extra MB to be on the safe side. When the HFS volume is burnt onto CD it will inherit the memory settings you've specified.)
Top
Conclusion
This tutorial has provided information on optimizing your Linx projects for deployment on the Internet. There are many other factors involved, but by following the guidelines in this tutorial you should be able to create projects that are well designed for posting on the Internet.
Top
 
©2008 Wildform, Inc | Policies | Contact Us | Newsletter Options
 
Wildform provides a 100% satisfaction guarantee on all our Flash software. If you are not completely satisfied with our Flash multimedia software for any reason you may request a refund within 15 days of purchase.