Цитата:
|
Сообщение от __etc
Kikasso, а что, простите, делает delete this?
|
так было написано в файле gallery_tween.fla только немного по-другому:

Код:
gallery_xml.onLoad = function(success:Boolean) {
try {
/* if you are able to successfully load and parse the gallery from a remote XML file,
parse out the image names and add them to an array. */
if (success) {
var images:Array = this.firstChild.childNodes;
var gallery_array:Array = new Array();
for (var i = 0; i<images.length; i++) {
gallery_array.push({src:images[i].firstChild.nodeValue});
}
/* call the displayGallery function which handles loading in each
of the gallery images and placing them on the Stage. */
displayGallery(gallery_array);
} else {
throw new Error("Unable to parse XML");
}
} catch (e_err:Error) {
trace(e_err.message);
} finally {
delete this;
}
};
файл находится по адресу
.../Flash8/Samples and Tutorials/Samples/Action Script/Galleries
Так что вопрос собственно не ко мне.
Разработчики просто поленились проверить, удаляет ли эта фраза ненужный более xml.
В таком виде - не удаляет.
В таком -

Код:
//delete this;
delete gallery_xml; // да, изнутри!
удаляет, что только что проверено:

Код:
setTimeout(function (){ trace(gallery_xml);}, 2000 );
xml там выглядит так:

Код:
<?xml version="1.0"?>
<gallery>
<img><![CDATA[DCP_0730.jpg]]></img>
<img><![CDATA[DCP_0731.jpg]]></img>
<img><![CDATA[DCP_0732.jpg]]></img>
<img><![CDATA[DCP_0733.jpg]]></img>
<img><![CDATA[DCP_0734.jpg]]></img>
</gallery>
где тут написано "utf-8" ?