Sending Flash in e-mail and posts.
Sending Flash movies (sometimes called Swish) in e-mail and newsgroup posts is a definite thrill. It's not hard either, once you have your Flash movie made. The scripting is simple, whether for popup or preview window. You can use simple templates, having only to change the width and height requirements of your movie.
Coding Flash by hand is difficult. Luckily, we have Swish, a program that creates Flash movie files. A demo program can be downloaded from their web site:
http://www.swishzone.com/
It is relatively easy to use and understand, and knowledge of Flash is not necessary. A tutorial is also available from FlashKit:
Swish Tutorial by FlashKit
Most of the time the Flash movie file (the .SWF file) is embedded in the post, but it can also be streamed from a web site. Usually when the Flash movie is too large to embed, a streaming script is used. You will see a lot of Flash in the stationery newsgroup as it is a popular item. Now for the scripts.
Download Flash Embed Package (4 scripts) 8k
These are the two scripts that have been altered by Richard Eagle to include the AMC to BGSOUND way of embedding the flash file. For some this maybe a bit hard to understand at first. These are for flash embedding for the ones that have want to embed them for the ones that have WMP9 and don't want to use Bill's wmp9 Toolkit. This method isn't needed when streaming a flash file.
Download Flash AMC to BGSOUND Embed Package (2 scripts) 5k
For the instructions for AMC to BGSOUND Flash file embedding for these 2
altered scripts Head on over to the AMC to BGSOUND AMC
to BGSOUND page
Play Miniature
Golf in a full screen popup that demonstrates Richards Full Screen Command
in a Popup!
Embedded (Preview Window)
<HTML>
<HEAD>
<STYLE>
body {
margin-top:20px;
color:#ffffff;
font-size:11pt;
font-family:arial}
</STYLE>
</HEAD>
<BODY bgcolor=#000000>
<OBJECT id=embed height=70 width=240 style="display:none"
classid=clsid:05589FA1-C356-11CE-BF01-00AA0055595A>
<!--Active Movie Control Object-->
<PARAM NAME="Filename" VALUE="file:///C:/folder/flashfile.swf">
</OBJECT>
<br><br>
<CENTER>
<SCRIPT language=vbs>
' Flash/Swish Script Template
' Preview Window Version (embedded)
' All HTML and script by Bill Scott, July, 2002
' http://www.lettermanstationery.com
Option Explicit
document.writeln "<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 "
'SET YOUR FLASH MOVIE SIZE HERE:
document.writeln "style='width: 450px; height: 300px'>"
document.writeln "<param name=bgcolor value='#000000'>"
document.writeln "<param name=loop value='true'>"
document.writeln "<param name=wmode value='transparent'>"
document.writeln "<param name=movie value='" & embed.Filename & "'>"
document.writeln "<param name=scale value='exactfit'>"
document.writeln "<param name=salign value='t'>"
document.writeln "<param name=quality value='high'>"
document.writeln "<param name=play value='true'>"
document.writeln "<param name=menu value='false'>"
document.writeln "</object>"
Sub Window_OnResize()
window.location.reload()
End Sub
</SCRIPT>
</CENTER>
</BODY>
</HTML>
<HEAD>
<STYLE>
body {
margin-top:20px;
color:#ffffff;
font-size:11pt;
font-family:arial}
</STYLE>
</HEAD>
<BODY bgcolor=#000000>
<OBJECT id=embed height=70 width=240 style="display:none"
classid=clsid:05589FA1-C356-11CE-BF01-00AA0055595A>
<!--Active Movie Control Object-->
<PARAM NAME="Filename" VALUE="file:///C:/folder/flashfile.swf">
</OBJECT>
<br><br>
<CENTER>
<SCRIPT language=vbs>
' Flash/Swish Script Template
' Preview Window Version (embedded)
' All HTML and script by Bill Scott, July, 2002
' http://www.lettermanstationery.com
Option Explicit
document.writeln "<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 "
'SET YOUR FLASH MOVIE SIZE HERE:
document.writeln "style='width: 450px; height: 300px'>"
document.writeln "<param name=bgcolor value='#000000'>"
document.writeln "<param name=loop value='true'>"
document.writeln "<param name=wmode value='transparent'>"
document.writeln "<param name=movie value='" & embed.Filename & "'>"
document.writeln "<param name=scale value='exactfit'>"
document.writeln "<param name=salign value='t'>"
document.writeln "<param name=quality value='high'>"
document.writeln "<param name=play value='true'>"
document.writeln "<param name=menu value='false'>"
document.writeln "</object>"
Sub Window_OnResize()
window.location.reload()
End Sub
</SCRIPT>
</CENTER>
</BODY>
</HTML>
When using the script above, enter the full file path to your Flash file in the <PARAM NAME="Filename" VALUE="file:///D:/NGTestArea/Flash6PlayerTest/space.swf"> line. This is the Active Movie Control object, and it is what causes the file to be embedded for the e-mail or post. Be sure to specify the width and height of the Flash movie.
Embedded (Popup)
<HTML>
<HEAD>
<script language=vbs>
' Mini script to eliminate BASE tag "Access Denied" error from OE for popup scripts.
' Script by Bill Scott, June, 2002
' http://lettermanstationery.tripod.com
Set bs0 = document.all.tags("BASE")
on error resume next
bs0(0).removeAttribute "href",0
</script>
<STYLE>
body {
margin:20px;
color:#ffffff;
font-size:11pt;
font-family:arial}
</STYLE>
</HEAD>
<BODY bgcolor=#000000>
<!--THIS IS THE START OF THE POPUP WINDOW-->
<DIV id=src style="display:none">
<STYLE id=PopupStyle>
.closebuttonStyle {
z-index:99;
cursor:hand;
position:absolute;
left:90%;
top:4%;
padding:2px;
border-style:solid;
border-color:#000000;
border-width:1px;
color:#000000;
font-size:7pt}
</STYLE>
<OBJECT id=embed height=70 width=240 style="display:none"
classid=clsid:05589FA1-C356-11CE-BF01-00AA0055595A>
<!--Active Movie Control Object-->
<PARAM NAME="Filename" VALUE="file:///C:/folder/flashfile.swf">
</OBJECT>
<div id=closeButton class=closebuttonStyle language=vbs onclick="parent.Popup.hide">close</div>
<CENTER>
<SCRIPT language=vbs>
document.writeln "<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 "
'SET YOUR FLASH MOVIE SIZE HERE:
document.writeln "style='width: 450px; height: 300px'>"
document.writeln "<param name=bgcolor value='#000000'>"
document.writeln "<param name=loop value='true'>"
document.writeln "<param name=wmode value='transparent'>"
document.writeln "<param name=movie value='" & embed.Filename & "'>"
document.writeln "<param name=scale value='exactfit'>"
document.writeln "<param name=salign value='t'>"
document.writeln "<param name=quality value='high'>"
document.writeln "<param name=play value='true'>"
document.writeln "<param name=menu value='false'>"
document.writeln "</object>"
</SCRIPT>
</CENTER>
</DIV>
<!--THIS IS THE END OF THE POPUP WINDOW-->
<!--THIS IS THE START OF THE PREVIEW WINDOW-->
<!--Button thumbnail image goes here-->
<IMG language=vbs id=thumbnail style="cursor:hand" onclick=showPopup src="file:///C:/folder/thumb.gif" border=0>
<br clear=all><br>
<div style="font-size:8pt">Click to show popup</div><br><br>
<SCRIPT language=VBS>
' Flash/Swish Script Template
' Popup Version (embedded)
' All HTML and script by Bill Scott, July, 2002
' http://lettermanstationery.tripod.com
' IE 5.5 or greater only
Dim Popup
Dim PopupBody
Dim PopupAll
Dim popupWidth, popupHeight, popx, popy
Set Popup=window.createPopup()
Popup.document.writeln src.innerHTML
Set PopupBody=Popup.document.body
Set PopupAll=PopupBody.all
'Set a border for the popup here. Set to 0px or "none" if no border wanted.
'Border styles: ridge solid double groove inset outset dashed dotted none
PopupBody.style.border="solid 1px #cccccc"
PopupBody.bgcolor="#000000"
PopupBody.scroll="no"
'Set popup width in pixels.
popupWidth=450
'Set popup height in pixels.
popupHeight=300
'Set popup X positioning. (example centers popup horizontally in window)
popx=(window.parent.screen.width-popupWidth)/2
'Set popup Y positioning. (example centers popup vertically in window)
popy=(window.parent.screen.height-popupHeight)/2
Sub showPopup()
Popup.show popx,popy,popupWidth,popupHeight
End Sub
Sub Window_OnResize()
window.location.reload()
End Sub
</SCRIPT>
</BODY>
</HTML>
<HEAD>
<script language=vbs>
' Mini script to eliminate BASE tag "Access Denied" error from OE for popup scripts.
' Script by Bill Scott, June, 2002
' http://lettermanstationery.tripod.com
Set bs0 = document.all.tags("BASE")
on error resume next
bs0(0).removeAttribute "href",0
</script>
<STYLE>
body {
margin:20px;
color:#ffffff;
font-size:11pt;
font-family:arial}
</STYLE>
</HEAD>
<BODY bgcolor=#000000>
<!--THIS IS THE START OF THE POPUP WINDOW-->
<DIV id=src style="display:none">
<STYLE id=PopupStyle>
.closebuttonStyle {
z-index:99;
cursor:hand;
position:absolute;
left:90%;
top:4%;
padding:2px;
border-style:solid;
border-color:#000000;
border-width:1px;
color:#000000;
font-size:7pt}
</STYLE>
<OBJECT id=embed height=70 width=240 style="display:none"
classid=clsid:05589FA1-C356-11CE-BF01-00AA0055595A>
<!--Active Movie Control Object-->
<PARAM NAME="Filename" VALUE="file:///C:/folder/flashfile.swf">
</OBJECT>
<div id=closeButton class=closebuttonStyle language=vbs onclick="parent.Popup.hide">close</div>
<CENTER>
<SCRIPT language=vbs>
document.writeln "<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 "
'SET YOUR FLASH MOVIE SIZE HERE:
document.writeln "style='width: 450px; height: 300px'>"
document.writeln "<param name=bgcolor value='#000000'>"
document.writeln "<param name=loop value='true'>"
document.writeln "<param name=wmode value='transparent'>"
document.writeln "<param name=movie value='" & embed.Filename & "'>"
document.writeln "<param name=scale value='exactfit'>"
document.writeln "<param name=salign value='t'>"
document.writeln "<param name=quality value='high'>"
document.writeln "<param name=play value='true'>"
document.writeln "<param name=menu value='false'>"
document.writeln "</object>"
</SCRIPT>
</CENTER>
</DIV>
<!--THIS IS THE END OF THE POPUP WINDOW-->
<!--THIS IS THE START OF THE PREVIEW WINDOW-->
<!--Button thumbnail image goes here-->
<IMG language=vbs id=thumbnail style="cursor:hand" onclick=showPopup src="file:///C:/folder/thumb.gif" border=0>
<br clear=all><br>
<div style="font-size:8pt">Click to show popup</div><br><br>
<SCRIPT language=VBS>
' Flash/Swish Script Template
' Popup Version (embedded)
' All HTML and script by Bill Scott, July, 2002
' http://lettermanstationery.tripod.com
' IE 5.5 or greater only
Dim Popup
Dim PopupBody
Dim PopupAll
Dim popupWidth, popupHeight, popx, popy
Set Popup=window.createPopup()
Popup.document.writeln src.innerHTML
Set PopupBody=Popup.document.body
Set PopupAll=PopupBody.all
'Set a border for the popup here. Set to 0px or "none" if no border wanted.
'Border styles: ridge solid double groove inset outset dashed dotted none
PopupBody.style.border="solid 1px #cccccc"
PopupBody.bgcolor="#000000"
PopupBody.scroll="no"
'Set popup width in pixels.
popupWidth=450
'Set popup height in pixels.
popupHeight=300
'Set popup X positioning. (example centers popup horizontally in window)
popx=(window.parent.screen.width-popupWidth)/2
'Set popup Y positioning. (example centers popup vertically in window)
popy=(window.parent.screen.height-popupHeight)/2
Sub showPopup()
Popup.show popx,popy,popupWidth,popupHeight
End Sub
Sub Window_OnResize()
window.location.reload()
End Sub
</SCRIPT>
</BODY>
</HTML>
When using the script above, enter the full file path to your Flash file in the <PARAM NAME="Filename" VALUE="file:///D:/NGTestArea/Flash6PlayerTest/space.swf"> line. This is the Active Movie Control object, and it is what causes the file to be embedded for the e-mail or post. Be sure to specify the width and height of the Flash movie, and the width and height of the popup.
Streamed (Preview Window)
<HTML>
<!--
Flash/Swish Script Template
Preview Window Version (streamed)
All HTML and script by Bill Scott, July, 2002
http://lettermanstationery.tripod.com
-->
<HEAD>
<STYLE>
body {
margin:0px;
color:#ffffff;
font-size:11pt;
font-family:arial, tahoma}
</STYLE>
<SCRIPT language=vbs>
</SCRIPT>
</HEAD>
<BODY bgcolor=#000000>
<CENTER>
<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=400 height=350>
<param name=bgcolor value="#000000">
<param name=loop value="TRUE">
<param name=wmode value="transparent">
<param name=movie value="http://www.yourwebsite.com/flashfile.swf">
<param name=scale value="exactfit">
<param name=salign value="t">
<param name=quality value="high">
<param name=play value="true">
<param name=menu value="false">
</OBJECT>
</CENTER>
</BODY>
</HTML>
<!--
Flash/Swish Script Template
Preview Window Version (streamed)
All HTML and script by Bill Scott, July, 2002
http://lettermanstationery.tripod.com
-->
<HEAD>
<STYLE>
body {
margin:0px;
color:#ffffff;
font-size:11pt;
font-family:arial, tahoma}
</STYLE>
<SCRIPT language=vbs>
</SCRIPT>
</HEAD>
<BODY bgcolor=#000000>
<CENTER>
<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=400 height=350>
<param name=bgcolor value="#000000">
<param name=loop value="TRUE">
<param name=wmode value="transparent">
<param name=movie value="http://www.yourwebsite.com/flashfile.swf">
<param name=scale value="exactfit">
<param name=salign value="t">
<param name=quality value="high">
<param name=play value="true">
<param name=menu value="false">
</OBJECT>
</CENTER>
</BODY>
</HTML>
Streamed files are not embedded, of course. They are actually drawn from a web site. When using the script above, enter the URL to your Flash file in the <PARAM NAME=movie VALUE="http://www.yoursite.com/flashfile.swf"> line. Be sure to specify the width and height of the Flash movie.
Streamed (Popup)
<HTML>
<HEAD>
<script language=vbs>
' Mini script to eliminate BASE tag "Access Denied" error from OE for popup scripts.
' Script by Bill Scott, June, 2002
' http://lettermanstationery.tripod.com
Set bs0 = document.all.tags("BASE")
on error resume next
bs0(0).removeAttribute "href",0
</script>
<STYLE>
body {
margin:20px;
color:#ffffff;
font-size:11pt;
font-family:arial}
</STYLE>
</HEAD>
<BODY bgcolor=#000000>
<!--THIS IS THE START OF THE POPUP WINDOW-->
<DIV id=src style="display:none">
<STYLE id=PopupStyle>
.closebuttonStyle {
z-index:99;
cursor:hand;
position:absolute;
left:90%;
top:4%;
padding:2px;
border-style:solid;
border-color:#000000;
border-width:1px;
color:#000000;
font-size:7pt}
</STYLE>
<div id=closeButton class=closebuttonStyle language=vbs onclick="parent.Popup.hide">close</div>
<CENTER>
<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=450 height=300 style="position:absolute; left:0px; top:0px">
<param name=bgcolor value="#000000">
<param name=loop value="true">
<param name=wmode value="transparent">
<param name=movie value="http://www.yourwebsite.com/flashfile.swf">
<param name=scale value="exactfit">
<param name=salign value="t">
<param name=quality value="high">
<param name=play value="true">
<param name=menu value="false">
</OBJECT>
</CENTER>
</DIV>
<!--THIS IS THE END OF THE POPUP WINDOW-->
<!--THIS IS THE START OF THE PREVIEW WINDOW-->
<!--Button thumbnail image goes here-->
<IMG language=vbs id=thumbnail style="cursor:hand" onclick=showPopup src="file:///C:/folder/thumb.gif" border=0>
<br clear=all><br>
<div style="font-size:8pt">Click to show popup</div><br><br>
<SCRIPT language=VBS>
' Flash/Swish Script Template
' Popup Version (streamed)
' All HTML and script by Bill Scott, July, 2002
' http://lettermanstationery.tripod.com
' IE 5.5 or greater only
Dim Popup
Dim PopupBody
Dim PopupAll
Dim popupWidth, popupHeight, popx, popy
Set Popup=window.createPopup()
Popup.document.writeln src.innerHTML
Set PopupBody=Popup.document.body
Set PopupAll=PopupBody.all
'Set a border for the popup here. Set to 0px or "none" if no border wanted.
'Border styles: ridge solid double groove inset outset dashed dotted none
PopupBody.style.border="solid 1px #cccccc"
PopupBody.bgcolor="#000000"
PopupBody.scroll="no"
'Set popup width in pixels.
popupWidth=450
'Set popup height in pixels.
popupHeight=300
'Set popup X positioning. (example centers popup horizontally in window)
popx=(window.parent.screen.width-popupWidth)/2
'Set popup Y positioning. (example centers popup vertically in window)
popy=(window.parent.screen.height-popupHeight)/2
Sub showPopup()
Popup.show popx,popy,popupWidth,popupHeight
End Sub
Sub Window_OnResize()
window.location.reload()
End Sub
</SCRIPT>
</BODY>
</HTML>
<HEAD>
<script language=vbs>
' Mini script to eliminate BASE tag "Access Denied" error from OE for popup scripts.
' Script by Bill Scott, June, 2002
' http://lettermanstationery.tripod.com
Set bs0 = document.all.tags("BASE")
on error resume next
bs0(0).removeAttribute "href",0
</script>
<STYLE>
body {
margin:20px;
color:#ffffff;
font-size:11pt;
font-family:arial}
</STYLE>
</HEAD>
<BODY bgcolor=#000000>
<!--THIS IS THE START OF THE POPUP WINDOW-->
<DIV id=src style="display:none">
<STYLE id=PopupStyle>
.closebuttonStyle {
z-index:99;
cursor:hand;
position:absolute;
left:90%;
top:4%;
padding:2px;
border-style:solid;
border-color:#000000;
border-width:1px;
color:#000000;
font-size:7pt}
</STYLE>
<div id=closeButton class=closebuttonStyle language=vbs onclick="parent.Popup.hide">close</div>
<CENTER>
<OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=450 height=300 style="position:absolute; left:0px; top:0px">
<param name=bgcolor value="#000000">
<param name=loop value="true">
<param name=wmode value="transparent">
<param name=movie value="http://www.yourwebsite.com/flashfile.swf">
<param name=scale value="exactfit">
<param name=salign value="t">
<param name=quality value="high">
<param name=play value="true">
<param name=menu value="false">
</OBJECT>
</CENTER>
</DIV>
<!--THIS IS THE END OF THE POPUP WINDOW-->
<!--THIS IS THE START OF THE PREVIEW WINDOW-->
<!--Button thumbnail image goes here-->
<IMG language=vbs id=thumbnail style="cursor:hand" onclick=showPopup src="file:///C:/folder/thumb.gif" border=0>
<br clear=all><br>
<div style="font-size:8pt">Click to show popup</div><br><br>
<SCRIPT language=VBS>
' Flash/Swish Script Template
' Popup Version (streamed)
' All HTML and script by Bill Scott, July, 2002
' http://lettermanstationery.tripod.com
' IE 5.5 or greater only
Dim Popup
Dim PopupBody
Dim PopupAll
Dim popupWidth, popupHeight, popx, popy
Set Popup=window.createPopup()
Popup.document.writeln src.innerHTML
Set PopupBody=Popup.document.body
Set PopupAll=PopupBody.all
'Set a border for the popup here. Set to 0px or "none" if no border wanted.
'Border styles: ridge solid double groove inset outset dashed dotted none
PopupBody.style.border="solid 1px #cccccc"
PopupBody.bgcolor="#000000"
PopupBody.scroll="no"
'Set popup width in pixels.
popupWidth=450
'Set popup height in pixels.
popupHeight=300
'Set popup X positioning. (example centers popup horizontally in window)
popx=(window.parent.screen.width-popupWidth)/2
'Set popup Y positioning. (example centers popup vertically in window)
popy=(window.parent.screen.height-popupHeight)/2
Sub showPopup()
Popup.show popx,popy,popupWidth,popupHeight
End Sub
Sub Window_OnResize()
window.location.reload()
End Sub
</SCRIPT>
</BODY>
</HTML>
Streamed files are not embedded, of course. They are actually drawn from a web site. When using the script above, enter the URL to your Flash file in the <PARAM NAME=movie VALUE="http://www.yoursite.com/flashfile.swf"> line. Be sure to specify the width and height of the Flash movie, and the width and height of the popup.
And so you have it. Try posting some Flash movies and see what the fun is all about. Even if you don't create your own, there are many Flash movies on the Internet that you can "creatively acquire" from web sites.