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

Вернуться   Форум Flasher.ru > Архив Flasher.ru > Flash > ActionScript

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

Регистрация: Mar 2001
Адрес: во сне
Сообщений: 2,701
Отправить сообщение для Usnul с помощью ICQ
По умолчанию Windows forever

вот простенький код окошек со скинами, разберайте =)
Код:
/*  
	Windows module Version 0.1 Usnul 06/2004 copyright (c)
	writen by Alex Goldring (Usnul) specially for mySQL,php,Flash forum in 2004 with refference to "Flash Windowed Intersace" version 8.1 and earlier versions by Usnul
*/
/*	Following code must be included in project for the module usage
	#include "windows.as"
	_root.skinpath="skins/default/window.swf"
*/
_root.skinpath="skins/default/window.swf";
_root.createEmptyMovieClip("WindowsModule",100); //Please do not forget to change the depth value 
_root.WindowsModule.counter=1;
_root.WindowsModule.creWindow=function(name){
	_root.WindowsModule.createEmptyMovieClip("Window"+_root.WindowsModule.counter,_root.WindowsModule.counter);
	_root.WindowsModule["Window"+_root.WindowsModule.counter].createEmptyMovieClip("Interface",1);
	_root.WindowsModule["Window"+_root.WindowsModule.counter].createEmptyMovieClip("Content",2);
	_root.WindowsModule["Window"+_root.WindowsModule.counter].Interface.loadMovie(_root.skinpath);
	_root.WindowsModule["Window"+_root.WindowsModule.counter].name=name;
	_root.WindowsModule["Window"+_root.WindowsModule.counter].onEnterFrame=function(){
		if(this.Interface.getBytesLoaded()==this.Interface.getBytesTotal()){
			if(this.Content._width>0){this.w=this.Content._width}else{this.w=150}
			if(this.Content._height>0){this.h=this.Content._height}else{this.h=100}
			this.Interface.ltc._x=this.Interface.ltc._y=0;
			this.Interface.tb._x=this.Interface.bb._x=this.Interface.t._x=this.Interface.ltc._width;
			this.Interface.tb._y=0;
			this.Interface.tb._width=this.Interface.bb._width=this.w;
			this.Interface.rtc._x=this.Interface.rb._x=this.Interface.rbc._x=this.Interface.tb._x+this.Interface.tb._width;
			this.Interface.rtc._y=0;
			this.Interface.lb._x=this.Interface.lbc._x=0;
			this.Interface.lb._y=this.Interface.rb._y=this.Interface.ltc._height;
			this.Interface.lb._height=this.Interface.rb._height=this.h;
			this.Interface.lbc._y=this.Interface.rbc._y=this.Interface.bb._y=this.Interface.lb._y+this.Interface.lb._height;
			this.Interface.cb._x=this.Interface.rtc._x-this.Interface.cb._width;
			this.Interface.cb._y=(this.Interface.tb._height-this.Interface.cb._height)/2;
			this.Interface.t._y=(this.Interface.tb.height-this.Interface.t._height)/2;
			this.Interface.name=this.name;
		}
		if(Key.isDown(1)){
			if(this.Interface.tb.hitTest(_root._xmouse,_root._ymouse,true)){
				this.startDrag();
				this.swapDepths(_root.WindowsModule.counter);
				_root.WindowsModule.counter++
				if(this.Interface.cb.hitTest(_root._xmouse,_root._ymouse,true)){
					this.removeMovieClip();
				}
			}
		}
		else{
			this.stopDrag();
		}
	}
	_root.WindowsModule.counter++
}
__________________
I'm only happy when it rains.
Waka Laka

Старый 16.06.2004, 08:45
Usnul вне форума Посмотреть профиль Отправить личное сообщение для Usnul Посетить домашнюю страницу Usnul Найти все сообщения от Usnul
  № 2  
Usnul
 
Аватар для Usnul

Регистрация: Mar 2001
Адрес: во сне
Сообщений: 2,701
Отправить сообщение для Usnul с помощью ICQ
поправил маленько:
Код:
/*  
	Windows module Version 0.1 Usnul 06/2004 copyright (c)
	writen by Alex Goldring (Usnul) specially for mySQL,php,Flash forum in 2004 with refference to "Flash Windowed Intersace" version 8.1 and earlier versions by Usnul
*/
/*	Following code must be included in project for the module usage
	#include "windows.as"
	_root.skinpath="skins/default/window.swf"
*/
_root.createEmptyMovieClip("skin",20);
_root.skin.loadVariables("skins/default/settings.txt");
_root.skinpath="skins/default/";
_root.createEmptyMovieClip("WindowsModule",100); //Please do not forget to change the depth value 
_root.WindowsModule.counter=1;
_root.WindowsModule.creWindow=function(name){
	_root.WindowsModule.createEmptyMovieClip("Window"+_root.WindowsModule.counter,_root.WindowsModule.counter);
	_root.WindowsModule["Window"+_root.WindowsModule.counter].createEmptyMovieClip("Interface",1);
	_root.WindowsModule["Window"+_root.WindowsModule.counter].createEmptyMovieClip("Content",2);
	_root.WindowsModule["Window"+_root.WindowsModule.counter].Interface.loadMovie(_root.skinpath+"window.swf");
	_root.WindowsModule["Window"+_root.WindowsModule.counter].name=name;
	_root.WindowsModule["Window"+_root.WindowsModule.counter].onEnterFrame=function(){
		if(this.Interface.getBytesLoaded()==this.Interface.getBytesTotal()){
			if(this.Content._width>0){this.w=this.Content._width}else{this.w=150}
			if(this.Content._height>0){this.h=this.Content._height}else{this.h=100}
			this.Interface.ltc._x=this.Interface.ltc._y=0;
			this.Interface.tb._x=this.Interface.bb._x=this.Interface.ltc._width;
			this.Interface.tb._y=0;
			this.Interface.tb._width=this.Interface.bb._width=this.w;
			this.Interface.rtc._x=this.Interface.rb._x=this.Interface.rbc._x=this.Interface.tb._x+this.Interface.tb._width;
			this.Interface.rtc._y=0;
			this.Interface.lb._x=this.Interface.lbc._x=0;
			this.Interface.lb._y=this.Interface.rb._y=this.Interface.ltc._height;
			this.Interface.lb._height=this.Interface.rb._height=this.h;
			this.Interface.lbc._y=this.Interface.rbc._y=this.Interface.bb._y=this.Interface.lb._y+this.Interface.lb._height;
			this.Interface.cb._x=this.Interface.rtc._x-this.Interface.cb._width;
			this.Interface.cb._y=(this.Interface.tb._height-this.Interface.cb._height)/2;
			if(this.txt==undefined){
			this.createTextField("txt",30,this.Interface.bb._x,0,this.Interface.lb._width,this.Interface.tb._height);
			}
			this.txt.autoSize=true;
			this.txt.selectable=false;
			this.TF=new TextFormat();
			this.TF.font=_root.skin.WindowTitleFont;
			this.TF.bold=_root.skin.WindowTitleFontBold;
			this.TF.italic=_root.skin.WindowTitleFontItalic;
			this.TF.color=_root.skin.WindowTitleFontColour;
			this.txt.setNewTextFormat(this.TF);
			this.txt.text=this.name;
		}
		if(Key.isDown(1)){
			if(this.Interface.tb.hitTest(_root._xmouse,_root._ymouse,true)){
				this.startDrag();
				this.swapDepths(_root.WindowsModule.counter);
				_root.WindowsModule.counter++
				if(this.Interface.cb.hitTest(_root._xmouse,_root._ymouse,true)){
					this.removeMovieClip();
				}
			}
		}
		else{
			this.stopDrag();
		}
	}
	_root.WindowsModule.counter++
}
__________________
I'm only happy when it rains.
Waka Laka

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

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

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


 


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


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