Media Production Services
Digital Media Production Services
After years of working in the music, film and online worlds, Lumieria knows its way around the digital media production landscape. Altough we are most often engaged in bringing creative technical solutions to life, we can provide limited production services for hire in the following areas: Creative Direction, Technical Direction, Graphic Design, Title Sequence Design, Motion Graphics Design, Music for Picture, Workflow R&D, FX Animation, Video Editing, Previsualization, Shader-writing, Custom Plug-in and Production Software Design.
//
// DAVES NOTE
// Despite what is said above, I plan to have multiple AJAX queries fired off from my page (one for each section)
// I'm going to use a function
function getAjaxRequest(url)
{
var request = false;
try {
request = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) {
try {
request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
request = false;
}
}
}
if (!request)
alert("Error initializing XMLHttpRequest!");
return request;
}
// This section done with the help of...
// http://knol.google.com/k/gimme-some-closure-object-oriented-javascript-ajax-callbacks#
// I'm using OO JavaScript to create an object named PageDivObj... here is the notation
// NOTE: BAD things to watch out for...
//
// KEY POINT: The garbage collection mechanisms from the DOM, and from JavaScript are SEPARATE. Which means...
// Do not keep member variables of DOM objects in JavaScript objects. And vice-versa. This means, any JS callbacks
// on DOM objects should be cleared before the DOM object is deleted, by removeChild or the setting of innerHtml on
// any ancestor (see purgeDom fn below)
// from: http://javascript.crockford.com/memory/leak.html
// d is a dom obj
function purgeDom(d) {
if (!d)
return;
var a = d.attributes, i, l, n;
if (a) {
for (i = a.length - 1; i >= 0; i -= 1) {
n = a[i].name;
if (typeof d[n] === 'function') {
d[n] = null;
}
}
}
a = d.childNodes;
if (a) {
l = a.length;
for (i = 0; i < l; i += 1) {
purgeDom(d.childNodes[i]);
}
}
}
function onReadyStateChangeCb( r )
{
if (r) {
//console.log( "status = " + r.status + "response = " + r.responseText );
// server fullfilled the request => readystate 4
if (r.readyState == 4) {
// r status == 200 => requested data is ready
if (r.status == 200)
{
//alert("Server is done!");
//var xml = r.responseXml; // - get XHTML result
var txt = r.responseText; // - get result in text
//console.log("got good response" + txt);
}
}
}
}
//When using XMLHttpRequest to get the HTML of a remote webpage, it is often advantageous to turn that HTML string into DOM for easier manipulation. However, there are potential dangers involved in injecting remote content in a privileged context in your extension, so it can be desirable to parse the HTML safely.
//The function below will safely parse simple HTML and return a DOM object which can be manipulated like web page elements. This will remove tags like