Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   Как это сделано (http://www.flasher.ru/forum/showthread.php?t=97198)

Type 15.06.2007 16:52

Как это сделано
 
не могу понять как сделана эта flash. Больно эффект красивый и редко встречаемый. Вот ссылка http://www.templatemonster.com/flash...tes/14041.html

или может есть вариант попроще как это делать. пробовал декомпелировать, бесполезно, все равно не понял.

etc 15.06.2007 16:54

Что вы хотите от людей получить, а?

BigDan 15.06.2007 16:58

Каждый день создаются подобные темы.... Для начала попробуйте сделать сами, а потом если детали не получаются,спросить на форуме.

Type 15.06.2007 17:00

сам пробовал не вышло,не работает нифига. может кто сталкивался с такой вещью смог бы дать ответ что и как или исходник. если не жалко.

etc 15.06.2007 17:07

Исходник чего? О каком эффекте речь? Вы хотите получить в руки готовый исходник подобного меню?

†‡Paladin‡† 15.06.2007 17:14

Глючный сайт. При открытой красной полоске, оранжевая может взять и перескочить наверх =) А так ниче сложного.

Therion 15.06.2007 17:41

нечего особенного...

Type 15.06.2007 21:22

2 Paladin: если ты сталкивался с этим мож поможешь, может исходник есть или какой туториал?

D12 16.06.2007 03:36

Держи приятель =) все просто :)
Идею реализации передрал как можно точнее =)
правдо код в моей манере , спотыкач :)

Код:

import flash.filters.*;
//////////////////////////////////////////////рисуем кнопки
//////////////////////////////////////////////
//////////////////////////////////////////////
var l:Number = 9;
//ширина кнопак
var z:Number = 40;
//растояние между кнопками
var button_colors:Array = [0x0033CC, 0x33CC66, 0xCCFF33, 0xFF0000];
//блок цветовой гаммы для кнопак
//
var button_box:MovieClip = createEmptyMovieClip(name, 1);
for (var i:Number = 1; i<=4; i++) {
        button_box.createEmptyMovieClip("button"+i, i);
        with (button_box["button"+i]) {
                beginFill(button_colors[i-1], 20);
                moveTo(-l, -l);
                lineTo(Stage.width, -l);
                lineTo(Stage.width, l);
                lineTo(-l, l);
                lineTo(-l, -l);
                endFill();
                var colors:Array = [button_colors[i-1], button_colors[i-1], button_colors[i-1], button_colors[i-1]];
                var alphas:Array = [0, 1, 1, 1];
                var ratios:Array = [0, 63, 126, 255];
                var filter:GradientGlowFilter = new GradientGlowFilter(0, 5, colors, alphas, ratios, 9, 9, 1.5, 2, "outer", false);
                var filterArray:Array = new Array();
                filterArray.push(filter);
                filters = filterArray;
                //
                //
        }
        button_box["button"+i]._x = 0;
        button_box["button"+i]._y = 0+i*z;
}
//////////////////////////////////////////////создаем текстовые поля
//////////////////////////////////////////////
//////////////////////////////////////////////
var button_textx:Array = [30, 350, 180, 270];
//растояние для текстовых блоков по оси икс
var button_texty:Array = [30, 70, 111, 151];
//растояние для текстовых блоков по оси игрик
var TEXT:Array = ["HOME", "SUPRA", "PORTFOLIO", "CONTACT"];
//поля текстовых блоков
//
button_box.createEmptyMovieClip("Text", 5);
for (var e:Number = 1; e<=4; e++) {
        button_box.Text.createEmptyMovieClip("Texts"+e, e);
        with (button_box.Text["Texts"+e]) {
                createTextField("mytext", 1, 30, 0, 70, 20);
                (instanceName, depth, x, y, width, height);
                myformat = new TextFormat();
                myformat.size = 9;
                myformat.color = 0xFFFFFF;
                myformat.font = "Impact";
                mytext.selectable = false;
                mytext.text = TEXT[e-1];
                mytext.setTextFormat(myformat);
                _y = button_texty[e-1];
                _x = button_textx[e-1];
        }
}
//////////////////////////////////////////////делаем скрипт анимации
//////////////////////////////////////////////
//////////////////////////////////////////////
var RGB1:Array = [0x000000];
//первоначальный цвет текста
var RGB2:Array = [0xFFFFFF];
//сменный цвет текста
var Go:Number = 12;
//скорость анимации
var Scale:Number = 200;
var Q:Number = 0;
//
button_box.onEnterFrame = function() {
        if (this.button4.hitTest(_root._xmouse, _root._ymouse, true)) {
                Q = 1;
        }
        if (!this.button4.hitTest(_root._xmouse, _root._ymouse, true)) {
                Q = 2;
        }
        //                   
        if (this.button4._yscale<=Scale && Q == 1) {
                this.button4._yscale += Go;
                this.button3._y -= Go/10;
                this.button2._y -= Go/10;
                this.button1._y -= Go/10;
                //
                var my_color:Color = new Color(this.Text.Texts4);
                my_color.setRGB(RGB1[0]);
                this.Text.Texts1._y -= Go/10;
                this.Text.Texts2._y -= Go/10;
                this.Text.Texts3._y -= Go/10;
        }
        if (this.button4._yscale>=100 && Q == 2) {
                this.button4._yscale -= Go;
                this.button3._y += Go/10;
                this.button2._y += Go/10;
                this.button1._y += Go/10;
                //
                var my_color:Color = new Color(this.Text.Texts4);
                my_color.setRGB(RGB2[0]);
                this.Text.Texts1._y += Go/10;
                this.Text.Texts2._y += Go/10;
                this.Text.Texts3._y += Go/10;
        }
        //                 
        //
        //
        //
        //
        //
        if (this.button1.hitTest(_root._xmouse, _root._ymouse, true)) {
                Q = 3;
        }
        if (!this.button1.hitTest(_root._xmouse, _root._ymouse, true)) {
                Q = 4;
        }
        //                   
        if (this.button1._yscale<=Scale && Q == 3) {
                this.button1._yscale += Go;
                this.button2._y += Go/10;
                this.button3._y += Go/10;
                this.button4._y += Go/10;
                //
                var my_color:Color = new Color(this.Text.Texts1);
                my_color.setRGB(RGB1[0]);
                this.Text.Texts2._y += Go/10;
                this.Text.Texts3._y += Go/10;
                this.Text.Texts4._y += Go/10;
        }
        if (this.button1._yscale>=100 && Q == 4) {
                this.button1._yscale -= Go;
                this.button2._y -= Go/10;
                this.button3._y -= Go/10;
                this.button4._y -= Go/10;
                //
                var my_color:Color = new Color(this.Text.Texts1);
                my_color.setRGB(RGB2[0]);
                this.Text.Texts2._y -= Go/10;
                this.Text.Texts3._y -= Go/10;
                this.Text.Texts4._y -= Go/10;
        }
        //                 
        //
        //
        //
        //
        //
        if (this.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
                Q = 5;
        }
        if (!this.button2.hitTest(_root._xmouse, _root._ymouse, true)) {
                Q = 6;
        }
        //                   
        if (this.button2._yscale<=Scale && Q == 5) {
                this.button2._yscale += Go;
                this.button1._y -= Go/10;
                this.button3._y += Go/10;
                this.button4._y += Go/10;
                //
                var my_color:Color = new Color(this.Text.Texts2);
                my_color.setRGB(RGB1[0]);
                this.Text.Texts1._y -= Go/10;
                this.Text.Texts3._y += Go/10;
                this.Text.Texts4._y += Go/10;
        }
        if (this.button2._yscale>=100 && Q == 6) {
                this.button2._yscale -= Go;
                this.button1._y += Go/10;
                this.button3._y -= Go/10;
                this.button4._y -= Go/10;
                //
                var my_color:Color = new Color(this.Text.Texts2);
                my_color.setRGB(RGB2[0]);
                this.Text.Texts1._y += Go/10;
                this.Text.Texts3._y -= Go/10;
                this.Text.Texts4._y -= Go/10;
        }
        //                 
        //
        //
        //
        //
        //
        if (this.button3.hitTest(_root._xmouse, _root._ymouse, true)) {
                Q = 7;
        }
        if (!this.button3.hitTest(_root._xmouse, _root._ymouse, true)) {
                Q = 8;
        }
        //                   
        if (this.button3._yscale<=Scale && Q == 7) {
                this.button3._yscale += Go;
                this.button1._y -= Go/10;
                this.button2._y -= Go/10;
                this.button4._y += Go/10;
                //
                var my_color:Color = new Color(this.Text.Texts3);
                my_color.setRGB(RGB1[0]);
                this.Text.Texts1._y -= Go/10;
                this.Text.Texts2._y -= Go/10;
                this.Text.Texts4._y += Go/10;
        }
        if (this.button3._yscale>=100 && Q == 8) {
                this.button3._yscale -= Go;
                this.button1._y += Go/10;
                this.button2._y += Go/10;
                this.button4._y -= Go/10;
                //
                var my_color:Color = new Color(this.Text.Texts3);
                my_color.setRGB(RGB2[0]);
                this.Text.Texts1._y += Go/10;
                this.Text.Texts2._y += Go/10;
                this.Text.Texts4._y -= Go/10;
        }
};
//////////////////////////////
//////////////////////////////
//////////////////////////////
button_box._y = 90;


googleavast 16.06.2007 12:28

D12 - истиный флэшер!!!
Поразил своим трудолюбием!!! =)

[__etc: Второй плюс за флейм]


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

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