Scrollbar malfunction, dynamic loading text/img content
I have some content loaded into a dynamic text field. The content is in an HTML text file. When the content loads with text only, everything works fine, but when I put in a link to an image file, the scroll bar does not function properly and goes below the height of the text field. Thanks for looking!
Here is a link to what I am working on to show how it is not working:
http://www.luxelab.com/beta/press.html
and the AS:
//eventhandler for the onEnterFrame from the scrollmovie
this._lockroot = true;
function FNSCROLL(){
if(this.scrollText != undefined ){
if(this.scrollText.maxscroll==1){
if(this._visible) this._visible=false;
}
else{
if(!this._visible)this._visible=true;
}
this.slyder.clear();
this.slyder.lineStyle(1,0xFFFFFF,100);
this.slyder.moveTo(0,0);
this.slyder.lineTo(0,this.scrollText._height-1);
this.rectwrapper._y=this.scrollText._height-this.rectwrapper._height;
if(this.pressUp){
if(this.scrollText.scroll>0){
this.scrollText.scroll-=1;
this.dragger._y = 10+int( (this.scrollText._height-30)*(this.scrollText.scroll-1) / this.scrollText.maxscroll );
}
}
if(this.pressDown){
if(this.scrollText.scroll<this.scrollText.maxscroll){
this.scrollText.scroll+=1;
this.dragger._y = 10+int( (this.scrollText._height-30)*(this.scrollText.scroll-1) / this.scrollText.maxscroll );
}
}
if(this.dragging){
var loc = this.dragger._y;
var yDragged = loc-10;
var newScroll = this.scrollText.maxscroll*yDragged/(this.scrollText._height-30);
this.scrollText.scroll=1+int(newScroll);
}
}
}
and the text file:
&article= <img src="admin/images/pressexample.jpg"/>
PRESS TEXT
Luxelab, nestled among the boutiques and cafes of Santa Monica's posh Montana Avenue, is the beautiful brainchild of Jason Lara and David Abrams. With their more than 40 years combined experience in the salon industry, Lara and Abrams put their well groomed heads together and created the perfect environment for their chic clientele. Luxelab is dedicated to the modern client. It is sleek, progressive, and sets the pace for Los Angeles hairdressing.
<img src="admin/images/pressexample.jpg"/>
PRESS TEXT
Luxelab, nestled among the boutiques and cafes of Santa Monica's posh Montana Avenue, is the beautiful brainchild of Jason Lara and David Abrams. With their more than 40 years combined experience in the salon industry, Lara and Abrams put their well groomed heads together and created the perfect environment for their chic clientele. Luxelab is dedicated to the modern client. It is sleek, progressive, and sets the pace for Los Angeles hairdressing.