It's okay I found it...
Try this HTML page for starters :
<html>
<head>
<title>Terminator</title>
</head>
<script language=JavaScript src="http://www.square-bear.co.uk/simon/HapPlayer411.js"></script>
<script language="JavaScript">
VFBox("450","350", "none");
function Startup() {
UseFile("http://www.square-bear.co.uk/simon/TerminatorRobot.htr","A");
}
var dl = new Downloader();
dl.AddFile('http://www.square-bear.co.uk/simon/TerminatorBody.jpg', 'A');
dl.FinishedString('\\settexture [figure=ninja_shirt file=[TerminatorBody.jpg]]');
AddToInitQueue("Startup();");
AddToInitQueue('dl.DoIt();');
</script>
<body>
<p>Let's hope this worked...</p>
</body>
</html>
That should get you on track. I used the Haptek Downloader object thingy to load the texture and then apply it.
There's documentation here : http://www.haptek.com/developers/HaptekGuide4/Programmin/Javascript/javascriptdoc.html#file_downloading
Still forget how to load hap files on the fly though- maybe GT40 can advise on that, but this seems to work for now.