Форум Flasher.ru
Ближайшие курсы в Школе RealTime
Список интенсивных курсов: [см.]  
  
Специальные предложения: [см.]  
  
 
Блоги Правила Справка Пользователи Календарь Сообщения за день
 

Вернуться   Форум Flasher.ru > Flash > ActionScript 1.0/2.0

Версия для печати  Отправить по электронной почте    « Предыдущая тема | Следующая тема »  
Опции темы Опции просмотра
 
Создать новую тему  
Старый 17.05.2007, 21:04
Killer_13 вне форума Посмотреть профиль Отправить личное сообщение для Killer_13 Найти все сообщения от Killer_13
  № 1  
Ответить с цитированием
Killer_13
 
Аватар для Killer_13

Регистрация: Jan 2007
Сообщений: 302
Question Не работает код по on(press)?

Есть анимированый мувик на нём указал три положения:
Код:
on(rollOver)
{
	this.gotoAndPlay(2);}
on(rollOut)
{
	this.gotoAndPlay(3);
	}
on(press)
{
this.gotoAndPlay(4);

}
потом вставил в четвёртый кадр самого мувика вот этот код создания галереи:
Код:
portfolioInfo = new XML();
portfolioInfo.ignoreWhite = true;
timeline = this;
baseurl = _url.substr(0, _url.lastIndexOf("/")+1);
portfolioInfo.onLoad = function() {
	
	portfolioTag = this.firstChild;
	
	(count=portfolioTag.childNodes.length);
	
	for (child=0; child<count; child++) {
		currentPicture = portfolioTag.childNodes[child];
		currentThumb = menu_mc.createEmptyMovieClip("thumbnail"+child, child);
		currentThumb._x = child*40;
		image = currentThumb.createEmptyMovieClip("thumbnail_image", 0);
		image.loadMovie(baseurl+currentPicture.attributes.THUMB);
		currentThumb.NAME = currentPicture.attributes.NAME;
		currentThumb.IMAGE = currentPicture.attributes.IMAGE;
		currentThumb.TEXT = currentPicture.attributes.TEXT;
		import mx.transitions.Tween;
		import mx.transitions.easing.None;
		currentThumb.onRollOver = currentThumb.onDragOver=function () {
			this.tweenX.stop();
			this.tweenY.stop();
			this.tweenX = new Tween(this, "_xscale", None.easeNone, this._xscale, 140, 0.3, true);
			this.tweenY = new Tween(this, "_yscale", None.easeNone, this._yscale, 140, 0.3, true);
			showName_txt.text = this.NAME;
		};
		currentThumb.onRollOut = currentThumb.onDragOut=function () {
			this.tweenX.stop();
			this.tweenY.stop();
			this.tweenX = new Tween(this, "_xscale", None.easeNone, this._xscale, 100, 0.3, true);
			this.tweenY = new Tween(this, "_yscale", None.easeNone, this._yscale, 100, 0.3, true);
			showName_txt.text = this.NAME;
			showName_txt.text = "";
		};
		
		currentThumb.onPress = currentThumb.onDragOver=function () {	
			image_mc.origDepth = image_mc.getDepth();	
			image_mc.swapDepths(image_mc._parent.getNextHighestDepth());
			mx.transitions.TransitionManager.start(image_mc, {type:mx.transitions.Photo, direction:0, duration:1, easing:mx.transitions.easing.Strong.easeOut, param1:empty, param2:empty});
			image_mc.loadMovie(baseurl+this.IMAGE);										 
			info_txt.text = "Loading...";
			timeline.loadVariables(baseurl+this.TEXT);
		};
		
	}
};
portfolioInfo.load(baseurl+"xmlportfoliowithimageandtext.xml");
но код не выполняется, хмл и файл находится в той же директории.
Подскажите пожалуйста.

Создать новую тему   Часовой пояс GMT +4, время: 07:36.
Быстрый переход
  « Предыдущая тема | Следующая тема »  

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


 


Часовой пояс GMT +4, время: 07:36.


Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.