Ну очень улыбнуло!!!
Анимация формы во Flash(морфинг). - (5)Анимация формы во Flash(морфинг) Морфинг отличается от предыдущих типов анимации тем,что работает...
Урок для Фотошоп " Закрываем глазки". - (11)От меня добавка - Кисти для фотошоп "Ресницы" Вложение: 4167720_eyelashes.rar Смотреть зде...
Анимация частей картинки с помощью маски.Урок для Adobe Flash. - (2)В комментариях к посту Использование анимированной маски в Adobe Flash.Урок ...
Текстовый скроллинг средствами флеш. - (0)Текстовый скроллинг. Прокрутка текста средствами флеш. (Часть п...
Делаем флеш открытку с эффектом курсора «Mouse trailer». Урок для Adobe Flash CS6. |
code:
//Import TweenMax
import com.greensock.*;
import com.greensock.easing.*;
//Hide the mouse
Mouse.hide();
//The starting color
var currentColor:uint = 0xffffff;
//This timer calls the changeColor() function every 0.5 seconds
var colorTimer:Timer = new Timer(500, 0);
colorTimer.addEventListener(TimerEvent.TIMER, changeColor);
colorTimer.start();
//This timer calls the createStar() method every 0.01 seconds
var trailTimer:Timer = new Timer(10, 0);
trailTimer.addEventListener(TimerEvent.TIMER, createStar);
trailTimer.start();
//Add an ENTER_FRAME listener so we can move the myStar
addEventListener(Event.ENTER_FRAME, moveStar);
//This function is called in each frame
function moveStar(e:Event):void {
//Set the myStar coordinates to match with the mouse coordinates
myStar.x = mouseX;
myStar.y = mouseY;
}
//This function is called by the colorTimer
function changeColor(e:Event):void {
//Assign a new random color
currentColor = Math.random() * 0xffffff;
//Tween the myStar to the currentColor
TweenMax.to(myStar, 0.7, {tint: currentColor});
}
//This function is called by the trailTimer
function createStar(e:Event):void {
//Create a new star
var newStar:MyStar = new MyStar();
//Set the newStar coordinates to match with the myStar coordinates
newStar.x = myStar.x;
newStar.y = myStar.y;
//Calculate random target x and y coordinates
var targetX:Number = newStar.x + Math.random() * 64 - 32;
var targetY:Number = newStar.y + Math.random() * 64 - 32;
//Calculate a random rotation
var targetRotation = Math.random() * 360 - 180;
//Add the newStar to the stage
addChild(newStar);
/*
Now we tween different properties of the newStar mc using TweenMax.
I call the "TweenMax.to()" multiple times so it's easier to read this code.
All of this could also be accomplished with one line.
Note that we call the function removeStar() when the tweens are finished.
*/
TweenMax.to(newStar, 3, {alpha: 0, scaleX: 5, scaleY: 5, tint: currentColor});
TweenMax.to(newStar, 3, {rotation: targetRotation, x: targetX, y: targetY});
TweenMax.to(newStar, 3, {blurFilter:{blurX:3, blurY:3}, onComplete: removeStar, onCompleteParams: [newStar]});
}
//This function is called when a star's tween is finished
function removeStar(star:MyStar):void {
//Remove the star from the stage
removeChild(star);
}
Серия сообщений "Уроки Flash":уроки в разных флешпрограммах, авторские уроки flashЧасть 1 - Делаем элементарные часики.Начинаем учиться созданию flash.
Часть 2 - Как правильно записать код флешки или видео в рамочку для кодов.
...
Часть 44 - Делаем флеш календарик в Adobe Flash (AS3).
Часть 45 - Текстовый скроллинг средствами флеш.
Часть 46 - Делаем флеш открытку с эффектом курсора «Mouse trailer». Урок для Adobe Flash CS6.
Часть 47 - Рисуем кнопку в Adobe Flash.
Часть 48 - Анимация частей картинки с помощью маски.Урок для Adobe Flash.
Часть 49 - Использование панели «Редактор движения» в Adobe Flash CS6.
Часть 50 - Анимация формы во Flash(морфинг).
Комментировать | « Пред. запись — К дневнику — След. запись » | Страницы: [1] [Новые] |
Комментировать | « Пред. запись — К дневнику — След. запись » | Страницы: [1] [Новые] |