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

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

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

Регистрация: Nov 2010
Сообщений: 5
По умолчанию Слайд шоу и кнопка

Доброго времени суток уважаемые.
Нашел в интернет пример реализации слайд шоу:
Код AS1/AS2:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var myShowXML = new XML();
var format:TextFormat = new TextFormat();
myShowXML.ignoreWhite = true;
myShowXML.load("slideshow.xml");
 
 
myShowXML.onLoad = function() {
	_root.myWidth = myShowXML.firstChild.attributes.width;
	_root.myHeight = myShowXML.firstChild.attributes.height;
	_root.mySpeed = myShowXML.firstChild.attributes.speed;
 
	_root.myImages = myShowXML.firstChild.childNodes;
	_root.myImagesNo = myImages.length;
 
	createContainer();
	callImages();
 
};
 
 
function createContainer() {
	_root.createEmptyMovieClip("myContainer_mc",1);
	myContainer_mc.lineStyle(5,0x9A7C53,100);
	myContainer_mc.lineTo(_root.myWidth,0);
	myContainer_mc.lineTo(_root.myWidth,_root.myHeight);
	myContainer_mc.lineTo(0,_root.myHeight);
	myContainer_mc.lineTo(0,0);
	myContainer_mc.
	myContainer_mc._x = 0;
	myContainer_mc._y = (Stage.height-myContainer_mc._height)/2;
}
 
function callImages() {
 
	_root.myMCL = new MovieClipLoader();
	_root.myPreloader = new Object();
	_root.myMCL.addListener(_root.myPreloader);
 
	_root.myClips_array = [];
 
	_root.myPreloader.onLoadStart = function(target) {
 
		_root.createTextField("myText_txt",_root.getNextHighestDepth(),0,0,100,20);
		_root.myText_txt._x = (Stage.width-_root.myText_txt._width)/2;
		_root.myText_txt._y = (Stage.height-_root.myText_txt._height)/2;
		_root.myText_txt.autoSize = "center";
format.font = "Romul";
format.color = 0xFFFFFF;
format.size = 32;		
_root.myText_txt.setNewTextFormat(format);
//_root.myText_txt.text = "Добро пожаловать!";
 
	};
 
_root.myPreloader.onLoadProgress = function(target) 
{
		_root.myText_txt._x = (Stage.width-_root.myText_txt._width)/2;
		_root.myText_txt._y = (Stage.height-_root.myText_txt._height)/2;
		_root.myText_txt.autoSize = "center";
format.font = "Romul";
format.color = 0xFFFFFF;
format.size = 32;		
_root.myText_txt.setNewTextFormat(format);
_root.myText_txt.text = "Загрузка...";
};
 
	_root.myPreloader.onLoadComplete = function(target) {
		_root.myClips_array.push(target);
		target._alpha = 0;
 
		if (_root.myClips_array.length == _root.myImagesNo) {
 
			_root.myText_txt._y = myContainer_mc._y + myContainer_mc._height;
			_root.target_mc = -1;
			moveSlide();
			myShowInt = setInterval(moveSlide, (_root.mySpeed*1000)+1000);
 
		}
 
	};
 
	for (i=0; i<_root.myImagesNo; i++) 
	{
		temp_url = _root.myImages[i].attributes.url;
		temp_mc = myContainer_mc.createEmptyMovieClip(i, myContainer_mc.getNextHighestDepth());
		_root.myMCL.loadClip(temp_url,temp_mc);
	}
 
}
function moveWate() {current_mc1 = _root.myClips_array[_root.target_mc];}
function moveSlide() {
 
	current_mc = _root.myClips_array[_root.target_mc];
	new Tween(current_mc, "_alpha", Strong.easeOut, 100, 0, 1, true);
 
	_root.target_mc++;
 
	if (_root.target_mc>=_root.myImagesNo) {
		_root.target_mc = 1;
	}
 
	_root.myText_txt.text = _root.myImages[target_mc].attributes.title;
	next_mc = _root.myClips_array[_root.target_mc];
	new Tween(next_mc, "_alpha", Strong.easeOut, 0, 100, 1, true);
 
}
Все работает, теперь необходимо добавить кнопку на этот слайд проигрыватель, но кнопка остаться всегда позади загружаемой картинки, прошу помощи.
С уважением Lamer6666

Добавлено через 24 часа 43 минуты

Народ, прошу помощи

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

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

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


 


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


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