2 var FlappLoader = function() {
4 FlappLoader.prototype = {
5 fromURL: function(url, dict, movieClip) {
6 var xhr = new XMLHttpRequest();
7 var ibit = new FlappIBit();
9 xhr.onreadystatechange = function() {
10 if (xhr.readyState > 1) {
11 if (xhr.status == 200) {
12 if (xhr.responseText) {
13 ibit.input(xhr.responseText);
14 loader.parse(ibit, dict, movieClip);
20 // xhr.responseType = 'arraybuffer';
21 xhr.overrideMimeType('text/plain; charset=x-user-defined');
24 parse: function(ibit, dict, movieClip) {
28 global.FlappLoader = FlappLoader;