Показать сообщение отдельно
Старый 13.01.2010, 20:14
Hauts вне форума Посмотреть профиль Отправить личное сообщение для Hauts Посетить домашнюю страницу Hauts Найти все сообщения от Hauts
  № 3  
Ответить с цитированием
Hauts
 
Аватар для Hauts

блогер
Регистрация: Feb 2008
Адрес: Россия, Новосибирск, Академгородок
Сообщений: 2,113
Записей в блоге: 1
Отправить сообщение для Hauts с помощью ICQ Отправить сообщение для Hauts с помощью Skype™
Я помогу. Замените код:

Код AS1/AS2:
function fadeZoom(target:MovieClip, delay:Number):Void {
	target.interval = function() {
		target._visible = true;
		clearInterval(target.intervalID);
		target.onEnterFrame = function() {
			target._xscale -= (target._xscale-100)/3;
			target._yscale -= (target._yscale-100)/3;
			target._alpha -= (target._alpha-100)/3;
			if (Math.abs(target._xscale-100)<1) {
				target._xscale = 100;
				target._yscale = 100;
				target._alpha = 100;
				delete target.onEnterFrame;
				target.fadeOutInterval = setInterval(fadeOut, 1000, target);
			}
		};
	};
	target.intervalID = setInterval(target, "interval", delay);
	target._xscale = 2000;
	target._yscale = 2000;
	target._alpha = 0;
}
function fadeOut(target) {
	clearInterval(target.fadeOutInterval);
	target.onEnterFrame = function() {
		target._xscale -= (target._xscale)/3;
		target._yscale -= (target._yscale)/3;
		target._alpha -= (target._alpha)/3;
		if (target._xscale<2) {
			target._xscale = 0;
			target._yscale = 0;
			target._alpha = 0;
			delete target.onEnterFrame;
		}
	};
}
function placeText(target:MovieClip, x:Number, y:Number, banner:String, tFormat:TextFormat, effectFunction:Function, delay:Number):Void {
	// For each character...
	for (var i = 0; i<banner.length; i++) {
		// Create a clip and place the current
		// character in the text field inside it.
		var char:MovieClip = target.attachMovie("letter", "char"+i, target.getNextHighestDepth());
		char.field.text = banner.substr(i, 1);
		char._x = x;
		char._y = y;
		// Add the width of the current text character to the
		// next letter's x position.
		x += tFormat.getTextExtent(char.field.text).width;
		//
		// Here is the effect function call, passed in as a parameter
		effectFunction(char, i*delay);
	}
}
var format:TextFormat = new TextFormat();
format.font = "Arial";
format.size = 24;
placeText(this, 100, 200, "This is a text effect", format, fadeZoom, 100);
__________________
hauts.ru