Reviving a 1999 Scriptlet

And Converting It to Modern JavaScript

On February 1, 1999, I wrote a tiny experiment called ANILEWIE.SCT.

It was a Microsoft Scriptlet — essentially an isolated HTML container running VBScript — and it animated a layered image of my face:

  • The eyes randomly moved to predefined coordinates
  • The mouth opened and closed
  • Everything was positioned with absolute positioning and z-index

No frameworks. No build tools. Just layered GIFs and a timer.

Eyes
Face
Teeth

The Original

Back then, Scriptlets were powerful. They ran in a sandbox, but could expose properties and events to communicate safely with a host container — similar to how embedded ActiveX controls behaved.

In the late 90s:

  • VBScript was common in government environments
  • Internet Explorer was assumed
  • Classic ASP defaulted to VBScript
  • VBA powered Outlook, Excel, and Access automation

It was a very Microsoft world.

Here’s the original VBScript core:

Sub Window_onLoad
Randomize Timer
E.style.left=20
E.style.top=46
NewLook
End Sub

Timers. String-based setTimeout. Inline logic. No modules. No separation of concerns.

It worked beautifully for 1999.


Fast Forward 26 Years

While digging through old archives, I found the original .SCT file.

The layering still worked.
The GIFs still existed.
The logic was simple enough to modernize.

So I rewrote it in plain JavaScript — no frameworks, no dependencies — keeping the spirit intact.

The updated version:

  • Uses Math.random() instead of Randomize Timer
  • Replaces string-based setTimeout with closures
  • Uses template literals
  • Replaces CInt with parseInt
  • Stores eye coordinates in an array
  • Uses small functional helpers for clarity

And it runs perfectly inside a simple HTML file — even inside an <iframe>.

VBScript is gone.

But interestingly, Microsoft now dominates with TypeScript, which sits above JavaScript — a poetic twist considering where this started.


The Animation Itself

The trick is simple:

  • Face (F.gif) is the base layer
  • Eyes (E.gif) are positioned behind using z-index
  • Mouth (T.gif) toggles display
  • Random coordinates are selected from a predefined list
  • A small “nudge” function animates movement toward the target

No canvas.
No WebGL.
Just DOM positioning and timers.

The effect still feels charmingly late-90s.


Why I Love This

This wasn’t just nostalgia.

It was a reminder that:

  • Layering and positioning were once “advanced” techniques
  • Randomized motion felt magical
  • Animation required patience and CPU compromises
  • Simplicity ages well

It also reminded me how comfortable I once was in VBScript — and how transferable that thinking was to modern JavaScript.

Same logic.
Different syntax.
Better tools.


See It For Yourself

🔗 Repo:
https://github.com/lewismoten/anilewie-scriptlet

🎬 Demo:
https://lewismoten.github.io/anilewie-scriptlet/

Now you too can enjoy the awesomeness and party like it’s 1999 staring into my eyes.

GIF animation

JavaScript Animation

Discover more from Lewis Moten

Subscribe now to keep reading and get access to the full archive.

Continue reading