 |
 |
   |
 |
 |
| Preparing
Flash Video, Audio and other .SWF Files for CD
Rom Projects |
 |
 |
| NOTE: This
tutorial provides information about creating
CD-ROM projects using Flash SWF files. If you
want to add Flash video to a CD-ROM, you should
strongly consider using FLV output as opposed
to SWF output, especially for video files larger
than 10MB. FLV output provides superior performance
when played from a CD-ROM. For instance, unlike
SWF files, FLV files do not preload 100% when
played from a CD. In addition FLV files do not
have the 16,000 frame limit or RAM consumption
issues of SWF files. |
 |
| Contents |
|
|
| Top |
 |
 |
| Introduction |
 |
We
receive many questions regarding the use of Flash
videofor use with CD-roms, typically for deployment
in a self-executing projector file. (A Flash
projector is a standalone executable file that
will play a Flash file. When you use a projector
it is not necessary to ensure that the end user
has the Flash player installed because the projector
contains both the file to be played and the player
itself.)
While you can use Flash video converter to create
video for CD Rom applications there are certain
issues that you should consider when making those
files. Because of the way Flash works, when you
have a SWF on CD, 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 SWFs
together and loading them sequentially (though
you will have a lag each time you load a new
swf).
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 Flash video 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.
Wildform products will automatically output projectors
for both Win and Mac. However, be aware that
the Mac projectors created on a Windows version
of our software are compressed and need to be
expanded on a Mac prior to running. The Mac projectors
created on a Mac version are already expanded.
We ran across the following information on the
web and the author, Radina Matic, offered to
let us post it here for our user's benefit. This
tutorial/faq should answer most of your questions
regarding the use of Flash video for CDs, including
creating projectors and authoring CDs.
This tutorial/faq is designed to answer the most
common questions associated with the creation
of Flash projectors and the methods of burning
those projectors to CD-roms. |
| Top |
 |
 |
| Why
use a Standalone Projector? |
 |
| The
main reason to use a Flash projector is for when
you want to distribute your Flash creations offline
and you do not want to worry if the user has
the Flash Player installed. |
| Top |
 |
 |
| Mac
Projector vs. Windows Projector |
 |
The
standalone Projector for PC comes with the normal
.exe extension, while the Mac Projector published
on PC comes with .hqx extension. HQX is not an
executable file, it is a compressed file format
(kind of like Mac's Zip file) which packs together
the two file forks Mac files have: the Data fork
and the Resource fork. The .hqx file will not
open on a PC if you doubleclick on it (because
it has to be decoded), and it will not work if
you burn it like that on CD with PC (for CD burning
issues see below).
Note: Mac projectors created on a PC must be
expanded prior to opening on a Mac. Mac projectors
made on a Mac do not have to be expanded - they
are already expanded. The Windows projectors
made on a Mac should work fine on a PC.
Note regarding Loading SWFs: If you want to load
other .swf files into your main movie, you ONLY
need to publish the main movie as an .exe/hqx,
not all of them. |
| Top |
 |
 |
| FSCommand
for Standalone Projector |
 |
FSCommands
are used to communicate between the Flash player
and the operating system.
- PC/Windows issues:
Flash 5 supports 6 FSCommands: "quit", "fullscreen", "allowscale", "trapallkeys" (locks
all keys, but user can still access the Status
bar by pressing the Windows key - if the
projector is set to display at full screen
- and exit your projector by pressing Alt
+ F4), "showmenu" ('false' argument
will disable all right click menu options
except "About Macromedia...") and "exec".
There is also an undocumented "Save" FSCommand
which allows you to write variables to a
user's HD.
The "Exec" command revealed itself
to be the most interesting because it gives
you the opportunity to make your movie communicate
with other programs, open files in their
default applications and lot more (see Resources).
On the other hand, if you would like to enhance
your projector, for instance change its shape,
make its background transparent, change title
and icon, and so on, you will have to use
one of 3rd party tools (see below for a partial
list).
The "Exec" command in Flash MX
is severely crippled since it does not allow
passing arguments anymore and all programs
you want to start from your projector must
be in the fscommand folder in the same root
as projector file. "Save" FSCommand
has also been suppressed. Some 3rd party
tools may offer workaround to this.
- Mac issues:
Normally all code should work on the Macintosh
platform without any problems (Flash was
made to be cross-platform). One thing you
will not be able to do with a Mac projector
is to write variables on a user's HD. Also,
when opening files with FSCommand you should
remember to use colons (:) (and not slashes
(/) as in PC) to separate folders in a pathname:
FSCommand ("exec", ":folder:filename");.
On the other hand, OSX uses standard Unix
path notation (/) and not colons.
Another way to open specific files with a
Mac projector is by using applescript, which
you should compile as an application in the
AppleScript Editor and then run with FSCommand.
Your applescript and the file you want to
open with the applescript should be in the
same folder. Here are 2 examples:
Example 1:
--set the name of the file to open
property fileName : "thedocument.pdf"
--get the path to the containing folder
set myPath to (path to me as string)
set AppleScript's text item delimiters to ":"
set the parentFolder to
((text items 1 thru -2 of myPath) & "")
as string
set AppleScript's text item delimiters to ""
-- find the flash file
try
set targetFile to alias (the parentFolder & fileName)
on error
--i.e. if there's no file here by this name,
it will quit.
return quit
end try
Example 2:
tell application "Finder"
open file targetFile
end tell
tell application "Finder"
activate
select file "Your File" of disk "Your
Disk"
open selection
end tell
There seems to be a problem/bug with Flash
MX projectors for Mac. Basically if you have
to load .swf's in your main movie it will
not stay full screen even if you use the
FSCommand for it correctly. The workaround
for this problem is to create an empty "container" movie
with only the FSCommand for full screen,
and then load your content into level1 or
higher. That seems to be the only way a Mac
projector will stay full screen (see Resources
below for more details).
Unfortunately, there are no 3rd party tools
for the Mac that can help you enhance your
projectors as there are for PC.
|
| Top |
 |
 |
| Burning
CDs with projectors |
 |
Once
you have your projector you will probably want
to burn it to a CD for distribution. I assume
that most of us know how to burn CDs for our
own platform, so I will only cover burning
hybrid (crossplatform) CDs here.
Since Flash projectors on CD have to be loaded completely into a computer's memory
(ram) before they start to play, you need to be careful about their size. Even
though there is no definite answer (though loading a series of .swf's into your
main movie may help), it is recommended that they should not be bigger then 25
Mb (Macromedia's original advice is: no bigger then 4MB! - see resources for
the technote). If you have to do a bigger project, you may consider switching
to Director. |
 |
| Burning
on Mac |
 |
Since
Mac recognizes the ISO 9660 file system and
Windows file formats, and Windows does not
understand Mac's Hierarchical File System (HFS)
file format, hybrid CDs used to have to be
burned on Macintosh. But PC users should not
despair because there are workarounds to this
(see below).
Toast
Toast is one of the burning programs which allows the creation of Hybrid CDs
on Mac. You will need to make temporary disk partition on your Desktop and copy
your Mac projector and eventually the shared .swf files (those that will be seen
on both Mac and PC) on it. In another folder on your desktop (but not in the
temporary partition) put all PC files (projector, autorun.inf and icon). Then
in Toast choose Custom Hybrid, select Mac volume, press Data button and then
simply select your temporary partition (or drag it onto the Toast window). Now
choose ISO volume, hit ISO button and select your PC files from the folder you
made (just the files, not the whole folder), and also select all the shared .swf
files from the temporary Mac partition. This way the shared files will be burned
only once, but will be seen on both Mac and PC. You will have to specify "Joliet" naming
settings for PC files so the names can be longer then 8.3 characters.
Autostart
The Autostart feature on the Mac is handled by QuickTime and you can choose the
file you want to autostart (your projector) from the settings in the Mac volume
of the Toast window. If you want your PC projector to autorun when the CD is
inserted, you'll have to make an autorun.inf file. You can use free program BBEdit
to create this file for the PC on your Mac. Choose New document and write this:
[autorun]
open=yourprojector.exe
icon=youricon.ico
Save the file as autorun.inf. It should be on the root of the CD to work correctly.
If you want your CD to show a custom icon in Windows Explorer, it should be in
the Windows icon format - any simple graphic image will not work. There is a
program called Iconographer that can make Windows icons on a Mac.
It may be wise to allocate enough RAM memory (which should be equal to the size
of your projector, the size of the .swf files to load into the main move, and
a couple of extra MB just to be sure) to your Mac partition before burning, because
the CD inherits its memory settings. When you have all this ready, burn your
CD and enjoy... |
 |
| Burning
on PC |
 |
The
only way to create cross-platform (hybrid)
CDs on a PC is to use a specific program that
makes an "image" file (this has nothing
to do with graphic images) containing your
Mac and PC projector and the shared files.
The image file is then burned to the CD with
your favorite burning software. The result
should work on both platforms and autorun works
on PC as autostart does on Mac. Here is the
procedure to use with a program called MacImage:
When you open the program it will be in the default Project Mode and Hybrid view.
Give the name to your Project, launch Explorer and drag your files in their places:
PC projector, autorun file and icon into the ISO view of the MacImage window,
Mac projector into the HSF view (do not worry about expanding .hqx files, because
the program takes care of it), and shared files into ISO/HSF view. This way PC
users will see only PC files, Mac users will see only Mac files and both will
see shared files. Once you have finished all this, you will have to compile the
image file: choose Compile option from the Projects menu (or click the fourth
button on the toolbar), give the name to your image file and the program will
do the rest. All you have to do now is burn the compiled image to CD with burning
software. But before that, you should take another step to implement Autostart
feature for Mac. Reopen the compiled image in the Partition Mode (switch mode
in the first item of Options menu), select the file you want to autostart (your
Mac projector), and choose the Autolaunch feature from the right click menu.
Resave the image and it will be ready for burning.
Almost all burning packages are capable of burning image files. In Nero you should
choose Burn Image option from the File menu, open your image file (switch to "all
files" type to see it), accept the default values from the pop up window
and it will burn the image to CD. And that's it.
PC users can make autorun.inf file in a text editor (Notepad) and it should look
the same as above. The autorun file should be on the root of your CD, but your
projector and icon do not have to be. Just remember to change the autorun.inf
file if you plan for any reason to put your projector into a specific folder
(the same is true for making autorun.inf for burning hybrid CDs on a Mac):
[autorun]
open=somefolder/yourprojector.exe
icon=somefolder/youricon.ico |
| Top |
 |
| This
tutorial was written by Radina Matic - DiDi. |
|
 |
   |
| |
|
| ©2012
Wildform, Inc | Policies | Contact
Us | Newsletter
Options |
| |
|
|
|
 |
 |
|