When support for Adobe Flash Player was ended in January 2021, (https://docs.microsoft.com/en-us/lifecycle/announcements/update-adobe-flash-support) the only way to use Boardworks animations has been to install unsupported versions of Flash Player. This path is strongly discouraged by Adobe and school IT departments because of the inherent security risks.
There is an open source, produced by volunteers, Flash emulator available at https://ruffle.rs/ that can either run standalone on your computer or be installed on webservers.
In theory therefore, it should be possible to run the Boardworks flash animations using Ruffle.
I have managed to do this with a couple of our school PowerPoint presentations that include Boardworks animations. This is how I did it.
1, First of all, take your Powerpoint file containing the Boardworks animation you want to use and make a copy of it in a new folder on your PC.
2. Change your Windows setting so that you can see file extensions.
3. Rename your file to change the .pptx etension to .zip
4. Now when you double-click on the file instead of running PowerPoint it will open it as a zip archive.
5. Open the .zip file. Open the ppt folder inside and the activeX folder inside that.
6. You should see some files ending in .bin (e.g. activeX1.bin). These are the files that contain your Boardworks Flash animations.
7. Copy the .bin files to a new folder on your PC.
I found this page http://blog.interrupt3h.com/?p=250 which explains how to extract the Flash files from a .bin. and provides the script that I used. To do this, you need to install php on your PC.
8. Download php for your PC from here: https://windows.php.net/download#php-8.1 (I used this one https://windows.php.net/downloads/releases/php-8.1.1-Win32-vs16-x64.zip)
9. Copy the installation files to a suitable directory - e.g. c:\php8
10. Set the path environment variable to include c:\php8 - like this:
11. Now you need to create the script file that will extract the Flash (.swf) files from the .bin files. I copied it from here:
http://blog.interrupt3h.com/?p=250. You can paste the text of the script into notepad, but it need to have these starting and ending character added: <?PHP (at the start) and ?> at the end. So the full file is:
<?PHP
//Script to extract SWF files from pptx files (once unzipped)
//Set up file type an extension for checking</code>
$FWSMarker = "FWS";
$extension = ".BIN";
// Start parsing directory
if ($handle = opendir('.')) {
echo "Directory handle: $handle\n";
echo "Entries:\n";
/* Loop over the directory searching for all files */
while (false !== ($entry = readdir($handle))) {
/* Check for file extension*/
$filename = strtoupper(rtrim($entry));
$entry_len = strlen($entry);
$entry_pos = $entry_len - strlen($extension);
/* If .BIN search in file for FWS*/
if (substr($filename, $entry_pos , strlen($extension)) == $extension )
{
echo "Found entry $entry that is a .bin file \n";
$newhandle = fopen($entry, "r");
$contents = fread($newhandle, filesize($entry));
$marker = strpos($contents, $FWSMarker);
if ($marker != 0)
{
echo "FWS Found at position : $marker\n";
// truncate file from before FWS marker
$newlen = strlen ($contents);
$contents = substr($contents, $marker, ($newlen-$marker));
// get SWF file length from SWF header and reverse (little endian)
$swflen = substr ($contents, 4, 4);
$swflen = strrev($swflen);
//convert file length into something php can work with
$act_len="";
for ($i=0; $i<4; $i++){
$newchar=ord(substr($swflen,$i,1));
$newchar=strval(dechex($newchar));
$act_len=$act_len.$newchar;
}
// convert from hex to dec
$act_len=hexdec($act_len);
echo "Actual SWF file length : $act_len bytes\n";
/* Truncate File to that length*/
$contents=substr($contents,0,$act_len);
/* Save New File */
$newfilename = $entry.".swf";
$newhandle = fopen($newfilename, 'w');
fwrite($newhandle,$contents);
echo "SWF file outputted to $newfilename \n\n";
fclose($newhandle);
}
}
}
//Wrap it up and exit
closedir($handle);
}
?>
12. So you now have php installed on your PC and you have created a PHP script file (e.g. mine is called "findswf.php". I placed this file in a folder called scripts inside my php8 folder. You have copied the .bin files from your PowerPoint into a new directory.
So now you can run your PHP script.
13. Run a Windows CMD prompt and navigate to your directory where your .bin files are stored.
14. Execute your PHP script by typing php c:\php8\scripts\findswf.php
15. This has now extracted your swf file from activeX1.bin and created a file called activeX1.bin.swf. This is your Boardworks Flash animation.
16. Install Ruffle from https://ruffle.rs/#downloads
17. Run ruffle and select your newly created .swf file for it to open.
18. Ruffle should run your animation ....
This now allows you to play the animations on a PC.
In theory, your IT dept could install Ruffle on their web server and centrally locate all the extracted .swf files - this would allow the animations to play on any web browser with the Ruffle extension installed (eg for Chrome) on your school network.
Hope this is useful.
Update: instead of using the Ruffle flash emulator, there is an Adobe product (Adobe Flash Player Projector - for development & debug) that is still available to play standalone .swf files. Please read the Adobe terms of use before using.
https://t.co/OgN12PKrIv Thanks to @https://twitter.com/gerryleo1964 for pointing this out.
No comments:
Post a Comment