# Scrolling text

**URL:** <https://forum.kirupa.com/t/scrolling-text/216063>\
**Category:** Uncategorized\
**Created:** [February 13, 2007, 1:54pm UTC](https://forum.kirupa.com/t/scrolling-text/216063 "2007-02-13T13:54:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![laudato](https://avatars.discourse-cdn.com/v4/letter/l/96bed5/32.png) [@laudato](https://forum.kirupa.com/u/laudato)\
**Post date:** [February 13, 2007, 1:54pm UTC](https://forum.kirupa.com/t/scrolling-text/216063/1 "2007-02-13T13:54:21Z")

</div>

hello.

please help me.

i want to scroll a text. the problem is when i define text inside flash, it my code works great, but when i import it from external source, it doesn’t.  
here is the code:

stop();

// sirina texta ti je onda  
sirina\_ = txt\_prvi.textHeight;  
duplicateMovieClip(“txt\_prvi”, “txt\_drugi”, this.getNextHighestDepth());  
// postavis drugi text pored prvog i pomeris za jedno 5 px  
txt\_drugi.\_y = txt\_prvi._y + sirina_ + 50;  
txt\_drugi.\_x = txt\_prvi.\_x;  
// skrolujes na onEnterFrame  
onEnterFrame = function() {  
txt\_prvi.\_y -= 5;  
txt\_drugi.\_y -= 5; // skrolujes za 3 px ili vec kolko zelis  
if ((txt\_prvi._y + sirina_) \< 0) { // ako je tekst ispao iz neke granice na primer 0  
txt\_prvi.\_y = txt\_drugi.\_y-3; //  
txt\_drugi.\_y = txt\_prvi._y + sirina_ + 400;  
}  
}

THANK YOU VERY MUCH
