# Having trouble with scroll

**URL:** <https://forum.kirupa.com/t/having-trouble-with-scroll/45166>\
**Category:** flash\
**Created:** [March 11, 2004, 4:34pm UTC](https://forum.kirupa.com/t/having-trouble-with-scroll/45166 "2004-03-11T16:34:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ken](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@ken](https://forum.kirupa.com/u/ken)\
**Post date:** [March 11, 2004, 4:34pm UTC](https://forum.kirupa.com/t/having-trouble-with-scroll/45166/1 "2004-03-11T16:34:10Z")

</div>

Hi can someone give me a hand with my scroller.  
I cant get the text to show in my movie, its a dynamic scroller all my action are there the text is in the same folder as my flash file  
the target to get the text is also good. why can i see the text??  
and its not the color of the backround text is white background black. I cant post the fla its way to big .

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 11, 2004, 4:53pm UTC](https://forum.kirupa.com/t/having-trouble-with-scroll/45166/2 "2004-03-11T16:53:30Z")

</div>

embed fonts…?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 11, 2004, 4:59pm UTC](https://forum.kirupa.com/t/having-trouble-with-scroll/45166/3 "2004-03-11T16:59:43Z")

</div>

eyezberg what do you mean embed fonts  
when I try my scroller on its own it works fine but no go in my movie

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 11, 2004, 5:12pm UTC](https://forum.kirupa.com/t/having-trouble-with-scroll/45166/4 "2004-03-11T17:12:32Z")

</div>

on the dynamic textfield, in the property inspector, you have the option to embed the font you’re using, or try \_sans…  
also, use a trace() to check if your terxt is really loaded, and don’t set it as the textfield’s text before it’s done loading or it won’t show…  
so many things can go wrong here, hard to tell without the code at least.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 11, 2004, 5:38pm UTC](https://forum.kirupa.com/t/having-trouble-with-scroll/45166/5 "2004-03-11T17:38:15Z")

</div>

ok here the code for scroller

stop();

loadVarsText = new loadVars();  
loadVarsText.load(“hometext1.txt”);  
//assign a function which fires when the data is loaded:  
loadVarsText.onLoad = function(success) {  
if (success) {  
trace(“done loading”);  
//Now that we know the data is loaded,  
//set the text content of the Text Field  
//with the instance name “scroller” equal to the  
//contents of the variable  
scroller.htmlText = this.article;  
} else {  
trace(“not loaded”);  
}  
};

onClipEvent(enterFrame) {  
sbFrame();  
}

// start line-by-line scrolling  
function pressArrow(d) {  
mode = “scroll”;

```
// remember direction
amount = d;

// do it at least once
sbFrame();

```

}

// stop scrolling  
function releaseArrow(d) {  
mode = “none”;  
}

// start page-by-page scrolling  
function pressBar() {  
mode = “page”;

```
// remember location of click and compute limit of paging
clickLoc = _ymouse;
limit = getSlider(_ymouse);

// compute number of lines in page
amount = (_parent.scroller.bottomScroll - _parent.scroller.scroll);

// scroll the other way?
if (clickLoc &lt; slider._y) amount *= -1;

// do it at least once
sbFrame();

```

}

// stop paging  
function releaseBar() {  
mode = “none”;  
}

// signal to follow slider  
function pressSlider() {  
mode = “slide”;  
}

// stop following slider  
function releaseSlider() {  
mode = “none”;  
}

// code to perform once per frame  
function sbFrame() {  
if (mode == “scroll”) {  
// scroll one line  
\_parent.scroller.scroll += amount;  
setSlider();

```
} else if (mode == "slide") {
	// compute new line and scroll to it
	line = getSlider(_ymouse);
	_parent.scroller.scroll = line;
	setSlider();		
	
} else if (mode == "page") {
	// scroll by page
	_parent.scroller.scroll += amount;
	
	// stop scrollng when limit reached
	if (((amount &gt; 0) and (_parent.scroller.scroll &gt; limit)) or ((amount &lt; 0) and (_parent.scroller.scroll &lt; limit))) {
		mode = "none";
		_parent.scrollText.scroll = limit;
	}
	setSlider();
}

```

}

// set the slider position according to the scroll  
function setSlider() {  
sbHeight = bar.\_height - slider.\_height;  
sbAmount = (\_parent.scroller.scroll-1)/(\_parent.scroller.maxscroll-1);  
slider.\_y = bar.\_y + sbHeight\*sbAmount;  
}

// get the scroll according to the slider position  
function getSlider(y) {  
sbHeight = bar.\_height - slider.\_height;  
pos = (y-bar.\_y-slider.\_height/2)/sbHeight;  
line = Math.ceil(pos\*(\_parent.scroller.maxscroll-1));  
return(line);  
}

ok in my movie I have a link, this link is called archives,  
press this link and a new page opens, this is where I want the scroller to be. when I test movie the scroller is there but it doesn’t scroll and there no text.
