define('DISALLOW_FILE_EDIT', true); HistoryKeeper – Page 2 – unFocus Projects – Kevin Newman and Ken Newman

AS3 unFocus.HistoryKeeper in SVN trunk

I added an initial round of AS3 files to the SVN trunk to make HistoryKeeper more accessible from Actionscript 3.0. If you are feeling adventurous, feel free to check it out of the trunk, and give it a try.

There is also a small resurrected Actionscript to Javascript communicator (eh, it’s totally new actually, but I got to use old knowledge!). The theory is that if you use fscommand to send simple strings to Javascript, you save on Flash setting up a lock to wait for a Javascript call to return a value or finish executing, which should conceivably avoid a short hiccup in the Flash Player. I’m not sure if there’s a real world benefit or not yet – one day I might get around to testing to make sure. At the very least, this framework will make it easier to setup fscommand, since it takes care of creating the javascript snippet for you. After that, it will simply eval whatever you put in the command argument (unless it’s a simple function on window, then it’ll just execute that).

Any comments are welcome. Please note, these classes may change quite a bit, they’re not to be considered stable (though the API probably is, there’s not much there really).

Quick Update – HistoryKeeper, SwfHTML, SwfShim

Just a quick post.

There have been a couple of fixes and changes that have gone into HistoryKeeper, SwfHTML and SwfShim that are now in the SVN trunk, as well as a few other issues that have been nailed down, and put into the issue tracker.

Among the fixes are finally a fix for the incorrect use of Javascript Errors in SwfHTML, as well as fixing the previously unfinished SwfShim.

Despite the fact that I can’t figure out how to pass flashvars from SwfShim to loaded AS3 based swfs, I’m still going to include it anyway, with a note about that caveat. It does solve some other issues, and adds an easy way to utilize ExpressInstall even if you are using html to embed the swf (rather than javascript). More on that in a future post.

I’ll also be cleaning house around the site, here and on google code. I’ve already removed some old lingering (and useless) ad stuff.

Also, since Microsoft removed the “click to activate” silliness, I went ahead and deprecated PatentMagic. It was buggy anyway.

Check back for more updates, and hopefully, an actual release!

unFocus.History Keeper 2.0 (and SwfHTML) Beta 2 – Out Now!

unFocus.History Keeper 2.0 Beta 2 is now available for download.

Feel free to download, test and use the new beta. Here’s what’s new and fixed:

  • History.js – There was an odd error, from a mixed up function, keeping History Keeper from working at all in the last release. It was the first issue reported by someone other than myself (thanks shacky7!) and it’s been fixed.
  • FlashPlayerInfo.js – was throwing an error if there was no flash player installed at all in IE. It’s fixed.
  • FlashPlayerInfo.js – added more robust Flash Player 6 detection. It is impossible to check for some minor revision versions in Flash Player 6, because they crash IE if you do. It’s now possible, though, to check for 6.0r65, which is the first version to support Express Install.
  • FlashPlayerInfo.js – deprecated “.getPluginType()”, and replaced it with “.getPlayerType()” and made it actually work. To practice discipline, I left “.getPluginType()” since it’s improper to change the API after a beta release (it didn’t work before, so I’m sure no one is using it).
  • FlashPlayerInfo.js – Fixed beta and MinorRevision errors in ActiveX path.
  • SwfHTML.js – was producing a security warning in IE if used over https. It’s fixed.
  • Added a bunch of test files for each object, to help make sure stuff doesn’t break (that’s annoying), and more thoroughly test the various methods and features. It is almost, sorta like unit testing, if you kinda look at it sideways, in a mirror. 🙂
  • Added Object Patent Magic to the package.
  • Added SwfShim to the source (under javascript folder), but it’s not ready for prime time yet, and is not in the packed js file.
  • Added some example pages – but these are really just there to test to the packed files, at the moment. HistoryKeeper.html is a good place to start if you want to learn how to use History Keeper. I’ll update soon with some Flash examples.

Check out the updated project page for more info, or just skip straight to the download. 🙂

unFocus.History Keeper 2.0 Beta 1 – Out Now!

The official Google Code name is unfocus-history-keeper. You can find the latest source in SVN. I will be doing development from trunk for now, until I can get to the tags and branches and whatnot to keep things organized.

For now, here is a snapshot. I’ll call it History Keeper 2.0 Alpha 1 for now. Let’s see where this goes from here.

For the first bug, the last state gets lost in some browsers, if you leave the site and then come back using the back button. I know how to fix it, i just need the time to implement that fix. That is the only known bug, so please feel free to leave a report in the issue tracker at Google Code if you find any more.

Also of note, you will find the source for the Swf Tools in there too (SwfHTML, FlashPlayerInfo, etc.) but if you are using ExternalInterface and SwfObject, you can safely omit those files when using History Keeper. You will not find any Actionscript code in there just yet. I’m still in the process of cleaning that stuff up (which basically means that the Communication stuff is incomplete in this release).

For your convenience, you will find two compressed JavaScript files in the root of the archive, unFocus-History-p.js and unFocus-HistorySwf-p.js.

unFocus-History-p.js contains:

  • EventManager.js
  • History.js

unFocus-HistorySwf-p.js contains:

  • EventManager.js
  • History.js
  • FlashPlayerInfo.js
  • SwfUtilities.js
  • SwfHTML.js

These were compressed using Dean Edwards’s Packer (included in above listed order).

There is also a QuickLoader Object in there, that may or may not have a bunch of quirks. Feel free to test it out. It attempts to begin working on the DOM as soon as it’s ready instead of waiting for the body’s onload event to fire.

Enjoy! 🙂 (Download here)

New version coming soon

I just finished work on a new site for my place of work – adcSTUDIO. It’s not quite finished yet, as there are a lot of things missing, but it’s launched, and most importantly from an unFocus Projects perspective, it’s using the latest versions of all the unFocus scripts! Feel free to take a look at the source of the html to find the usage and links to the files. There is still quite a bit of clean up to do for a release, but at least there’s progress. 🙂