View Full Version : MX - Perspective text
wilma
October 6th, 2003, 10:39 AM
is there any way of creating the same perspective motion in AS as i've done in the below attachment using tweens?
wilma
Voetsjoeba
October 6th, 2003, 02:42 PM
Yes there is :)
beginTime = 2
function moveHello(targetX, targetY, targetS) {
clearInterval(begin)
hello.onEnterFrame = function() {
this._x = targetX-(targetX-this._x)/1.2;
this._y = targetY-(targetY-this._y)/1.2;
this._xscale = this._yscale=targetS-(targetS-this._xscale)/1.2;
this._x>=targetX-1 ? delete this.onEnterFrame : null;
};
}
begin = setInterval(moveHello,beginTime*1000,275,200,150)
beginTime is the time in seconds to wait before starting the movement :)
Voetsjoeba
October 6th, 2003, 02:43 PM
D'oh, forgot the fla :P
wilma
October 7th, 2003, 04:05 AM
cheers for that. you're a star.
Which is the element that controls the size of the word at its initial position?
Voetsjoeba
October 8th, 2003, 10:00 AM
There is nothing that controls the initiate size of the word. You can implement it easily by adjusting the script like this:
beginTime = 2;
hello._xscale = hello._yscale = 50
// 50 is the size in procent
function moveHello(targetX, targetY, targetS) {
clearInterval(begin)
hello.onEnterFrame = function() {
this._x = targetX-(targetX-this._x)/1.2;
this._y = targetY-(targetY-this._y)/1.2;
this._xscale = this._yscale=targetS-(targetS-this._xscale)/1.2;
this._x>=targetX-1 ? delete this.onEnterFrame : null;
};
}
begin = setInterval(moveHello,beginTime*1000,275,200,150)
:)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.