![]() |
|
||||||||||
|
|||||
|
Регистрация: Aug 2004
Адрес: Украина
Сообщений: 29
|
Помогите плз. проблема с асфунктион.
вобщем есть муви , в нем текстовое поле куда грузиться текст из .тхт скрипт всем знакомый, такой: #include "ldtxt.as"
function loadNews(fileName) {
trace("loadNews("+fileName+")");
ScrollLine.scroller._y = ScrollLine.scroller.startY;
textSource = new TextFile(true);
textSource.onLoad = function(ok) {
if (ok) {
_root.newss.news = this.content;
} else {
_root.news = "<FONT COLOR=/red' SIZE='+3'>*** ERROR LOADING FILE ***</FONT>";
}
};
if (!fileName.indexOf("<url>")) {
fileName = _root._pathToRoot+fileName.substring(5);
}
textSource.load(fileName);
}
_root._pathToRoot = _root._url.substring(0, _root._url.lastIndexOf("/"));
loadNews("main.txt");
function TextFile(u) {
// If we use files with one-byte encoding, then we should
// set useCodepage property to true.
if(u != null) System.useCodepage = u;
}
var o = TextFile.prototype;
o.load = XML.prototype.load; //ASNative(301, 0);
o.getBytesTotal = function() {
return(this._bytesTotal);
}
o.getBytesLoaded = function() {
return(this._bytesLoaded);
}
o.onLoad = function() { }
o.onData = function(src) {
this.loaded = (src != null);
this.content = src;
this.onLoad(this.loaded);
}
o.toString = function() {
return(this.content);
}
delete o;
нужно чтоб из асфунктион в текстовом файле грузила другой текстовый файл во флешку: короче надо чтоб этот скрипт загрузил текстовый файл. другие скрипти работают, а этот никак.... ![]() |
![]() |
Часовой пояс GMT +4, время: 00:58. |
|
|
« Предыдущая тема | Следующая тема » |
|
|