PDA

View Full Version : Scrolling text upwards like in movie credits


Roycommi
03-04-2004, 05:14 PM
Hi,

How would I scroll three areas of text up using actionscrtipt? I have an external txt file with 3 fields that contain text? I would like to scroll them up like credits at the end of a movie.

I see the ticker tutorials but cant seem to bridge from that to upwards scrolling text. I wanna have them in an external file beacuse its the screen telling you waht your mission is in a game I am trying to make, so each mission would need a new txt file. (rather than making a movie clip with the text on it and just scrolling it up the frame in Flash)

Thanks in advance

Roycommi

cobo
03-05-2004, 05:23 AM
this is just one way...

put this on your main timeline...

_root.onEnterFrame = function() {
if(yourTxtBox._y >= 0) {
yourTxtBox._y -= 3;
}
}


this will decrement your txtBox y position every frame by 3 pixels...

you could do the same with a setInterval() function, wich gives you better control of the speed.


cobo

Roycommi
03-05-2004, 11:00 AM
Heya,

Here is my FLA (http://www.roycommi.com/flash/credits.fla)

I am confused about the code you posted. I understand the logic but not the implementation.

Ed

Roycommi
03-05-2004, 12:45 PM
I figured it out!!

I attatched this code to the movie clip itself:

onClipEvent(enterFrame) {
n += .1;
this._x = 120;
this._y = this._y - 1;
if ( this._y <= 118) {
this._y = 118;
}

}

And now it works :-)