Показать сообщение отдельно
Старый 29.03.2002, 04:29
john вне форума Посмотреть профиль Отправить личное сообщение для john Посетить домашнюю страницу john Найти все сообщения от john
  № 14  
john
МЕГАФЛЭШЕР

Регистрация: May 1999
Адрес: Россия, Москва
Сообщений: 1,181
Вот это я думаю это уже окончательный релиз


Код:
//*************************************************************************
//-------------------------------------------------------------------------
//	class image
//-------------------------------------------------------------------------
_global.Image = function(src,mc)
{
	this._targetMovie = mc;
	this.data = new Sound();
	this.data.root = this;
	if (src != undefined) 
	{
		this.tmp_interval = setInterval(this,"load",20,src)// for onLoad creat
	}
}
Image.prototype.load = function(src,mc)
{
	clearInterval(this.tmp_interval);
	
	this._targetMovie = mc||this._targetMovie;
	this._src = src;
	
	this.data.onLoad = function()
	{
		this.root.onLoad();
	}
	this.data.loadSound(src);
}
Image.prototype.getBytesLoaded = function()
{
	return this.data.getBytesLoaded();
}
Image.prototype.getBytesTotal = function()
{
	return this.data.getBytesTotal();
}
Image.prototype.onLoad = function()
{
	if(this._targetMovie != undefined )this._targetMovie.loadMovie(this._src);
}

Image.prototype.addProperty("src",function()
{
	return this._src;
},Image.prototype.load)

ASSetPropFlags(_global, "Image", 7);

//*************************************************************************
//-------------------------------------------------------------------------
//	usage 1
//-------------------------------------------------------------------------
img = new Image("load.jpg");
img.onLoad = function()
{
	myMovie_mc.loadMovie("load.jpg");
}
//-------------------------------------------------------------------------
//	usage 2
//-------------------------------------------------------------------------
img = new Image();
img.onLoad = function()
{
	myMovie_mc.loadMovie("load.jpg");
}
img.load("load.jpg")
//-------------------------------------------------------------------------
//	usage 3
//-------------------------------------------------------------------------
img = new Image();
img.onLoad = function()
{
	myMovie_mc.loadMovie("load.jpg");
}
img.src = "load.jpg";
//-------------------------------------------------------------------------
//	usage 4
//-------------------------------------------------------------------------
img = new Image();
img.load("load.jpg",myMovie_mc);
//-------------------------------------------------------------------------
//	usage 5
//-------------------------------------------------------------------------
img = new Image("load.jpg",myMovie_mc);