PDA

View Full Version : Help with scrollpane comp


flashfan
05-23-2003, 10:53 PM
I thought all you need to do is name the klip you want to scroll and thats it? whats the basic run down for scrolling text as a klip? I am aware of the auto vert or horizontal, but how do you define the object? I did it once but now I forgot. Thanks

CyanBlue
05-24-2003, 05:04 AM
Howdy and Welcome... ;)

I thought that I could do this, but obviously I cannot... There is definately something I am missing here... What is it??? :(

Uncomment the last line to see the text disappear into the scrollPane... Font is embedded properly, I think, and I just don't know... :(textTF = new TextFormat();
textTF.bold = true;
textTF.color = 0x0000FF;
textTF.font = "Verdana";
textTF.size = 12;

this.createEmptyMovieClip("testText", 100);
this.testText.createTextField("content", 200, 0, 0, 225, 225);
for (i = 1 ; i <= 100 ; i++)
{
this.testText.content.text += "Line" + i + "\n";
}
this.testText.content.border = true;
this.testText.content.embedFonts = true;
this.testText.content.setTextFormat(textTF);

this.attachMovie("FScrollPaneSymbol", "contentSP", 200, {_x:50, _y:50});
this.contentSP.setSize(150, 100);
//this.contentSP.setScrollContent(this.testText);

File has been trashed...

CyanBlue
05-24-2003, 05:42 AM
Aha... Dumb... Dumb... Now, I know...

The depth of the scrollPane instance should be lower than the movieclip that it is loading into... (Correct me if I am wrong...)textTF = new TextFormat();
textTF.bold = true;
textTF.italic = true;
textTF.color = 0x0000FF;
textTF.font = "Verdana";
textTF.size = 12;

this.createEmptyMovieClip("testText", 100);
this.testText.createTextField("content", 200, 0, 0, 225, 1500);
for (i = 1 ; i <= 100 ; i++)
{
this.testText.content.text += "Line" + i + "\n";
}
this.testText.content.border = true;
this.testText.content.embedFonts = true;
this.testText.content.setTextFormat(this.textTF);

this.attachMovie("FScrollPaneSymbol", "contentSP", 50, {_x:50, _y:50});
this.contentSP.setSize(150, 100);
this.contentSP.setScrollContent(this.testText);

flashfan
05-27-2003, 05:59 PM
Thanks man!! I was looking for the most basic, like text/graphic in a movie klip. I forgot how to assign what the component targets. How do I do that?