ScottShiller.com Analysis

I like his site, let's see how he does it!

by Steven Senkus

JavaScript

/*
 SCOTTSCHILLER.COM | V4.04: NOW WITH FUNK
 ----------------------------------------
 This is some crazy animation scriptage.
 probably not very efficient, either .. 
 .. But it works. Usually. view at risk.

 Core objects:
 ----------------------------------------
  - Window
  - DropShadow
  - Queue Item
  - Queue Object
  - Event
  - Action
  - DragHandler
  - Preloader
  - ContentManager
  - SoundManager  

 Quick summary:
 ----------------------------------------

 Window objects are created which are
 tied to events. There is an event queue
 that holds event objects, which can have
 associated action objects. Windows have
 methods like moveTo, resizeBy etc. which
 "automagically" create and assign events.

 A number of actions can be queued up and
 fired - the animated into to this site
 is done exactly that way.

 eg. the following call:

  with (addAction(preload)) {
    delay = 500;
    method = restore;
    sound = 'window3';
    enqueue();
  }

 ..enqueues the "preload" window object,
 calling the "restore" method (action)
 and playing the associated "window3"
 sound effect. This action fires after
 a 500ms delay.

 A number of actions can be queued up in
 this manner and fired simultaneously or
 in sequence (ie. multiple windows moving
 at once, or one window at a time.)

 Refer to the "preInit()" function below
 to see how the intro animation is made.


 Bugs and other known annoyances:
 ----------------------------------------

 IE doesn't seem to like JS-to-ActiveX
 calls after a certain point for some odd
 reason, this can cause it to crash.
 (This method is used for sound effects.)

 Related (improved) javascript-sound API:
 schillmania.com/projects/soundmanager/

*/

if (window.location.href.indexOf('scottschiller.com')==-1) window.location.href = 'http://www.scottschiller.com/';

var o = null;

var contentManager = null;
var soundManager = null;

var hideWhileScrolling = false;

function WindowObject(o,x,y,w,h) {
  var self = this;
  this.o =...