Moving Text
I am wanting to take my banner and add some moving text in it, it would fade in then go fast, then slowly move so you can read it, then go fast off the banner Does anyone know a good tut for this or can help me?
something like this www.team-dignitas.com how they have there top banner.
Thanks
Re: Moving Text
Originally posted by SiKBobby
I am wanting to take my banner and add some moving text in it, it would fade in then go fast, then slowly move so you can read it, then go fast off the banner Does anyone know a good tut for this or can help me?
something like this www.team-dignitas.com how they have there top banner.
Thanks
the text must be dinamic and you have to add the used characters in the properties...
example:
Attached Files
Last edited by SuperOito; 02-06-2005 at 05:23 PM .
Se a vida te virar as costa, aproveita e apalpa-lhe o rabo
Ahh!! Thank you
But im still having problems, how do I get the text to start moving to the side?!?! And how do I make it fade out?!
Thanks
Last edited by SiKBobby; 02-06-2005 at 07:22 PM .
make a dynamic text field in a movieclip, then add a function to the MovieClip prototype that has a looping function (either onEnterFrame or setInterval). Within the looping function, make at least 3 conditional statements (if..else if..else, or a switch statement), which will control the 3 parts of the movement (fly in, slow, fly out).
something like this
MovieClip.prototype.flyInFlyOut = function(sp1:Number, sp2:Number, decel:Number, accel:Number, dur:Number, isText:Boolean, isRem:Boolean) {
//------------------------------------
//record properties of movement
this.fastSpeed = sp1;
this.slowSpeed = sp2;
this.diffSpeed = sp1-sp2;
this.changeSpeed = (-1*(sp1-sp2));
this.count = 0;
//
this.decelx = decel;
this.accelx = accel;
//
this.dur = dur;
//
this.isText = isText;
this.isRemoved = isRem;
//------------------------------------
// widths
this.fullWidth = Number(this._width);
//this.stageWidth = 640;
this.stageWidth = _global.movieWidth;
//------------------------------------
//initial state
if (this._x>this.decelx) {
this.state = "flyIn";
this.currSpeed = sp1;
} else if (this._x<this.decelx && this._x>this.accelx) {
this.state = "slow";
this.currSpeed = sp2;
} else if (this._x<this.accelx) {
this.state = "flyOut";
this.currSpeed = sp1;
}
//------------------------------------
//
this.onEnterFrame = function() {
switch (this.state) {
case "flyIn" :
this._x -= this.currSpeed;
if (this._x<this.decelx) {
this.state = "slowDown";
this.count = 0;
}
break;
case "slowDown" :
//change of speed
if (this.count<this.dur && this.currSpeed>this.slowSpeed) {
// t: current time, b: beginning value, c: change in position, d: duration
var changeInSpeed = _global.easeOutExpo(this.count, this.diffSpeed, this.changeSpeed, this.dur);
this.currSpeed = this.slowSpeed+changeInSpeed;
this.count++;
this._x -= this.currSpeed;
} else {
//trace("goto slow speed");
this.currSpeed = this.slowSpeed;
this.state = "slow";
}
break;
case "slow" :
this._x -= this.currSpeed;
if (this._x<this.accelx) {
this.state = "speedUp";
this.count = 0;
}
break;
case "speedUp" :
//change of speed
if (this.count<this.dur && this.currSpeed<this.fastSpeed) {
// t: current time, b: beginning value, c: change in position, d: duration
var changeInSpeed = _global.easeOutExpo(this.count, 0, this.diffSpeed, this.dur);
this.currSpeed = this.slowSpeed+changeInSpeed;
this.count++;
this._x -= this.currSpeed;
} else {
this.currSpeed = this.fastSpeed;
this.state = "flyOut";
}
break;
case "flyOut" :
this._x -= this.currSpeed;
if (this._x<(0-this.fullWidth)) {
//reset the location
if (this.isRemoved == true) {
//trace("removing: "+this);
this.fadeInOut(false, true);
this.onEnterFrame = undefined;
} else {
this._x = this.stageWidth;
this.state = "flyIn";
}
}
break;
default :
trace("other state: "+this.state);
}
};
};
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width