Show only "x" lines of dynamically loaded html

hello,
I’ve succesfully made a few flash websites, nothign special, with help from the kind folks here at kirupa, and now I am in need once again.

I’m trying to use actionscript to load an external html file with css, but I only want a certain number of lines from the html file to be shown. The html file consists of events, but I only want to show current events on one particular page. I thought it might be possible to have actionscript read only the lines from…say…“Current Events” to “Past Evenets.” I hope that makes sense.

Another thought might be to use xml to do what I’m looking for, but either way, I’m at a loss for how to achieve my goal. Does anyone have any suggestions?

cheers,
e.s.a.

The short answer is no, you really can’t make it only read certain lines. You should just redesign the text files to only contain what needs to be loaded and displayed.

there has to be a way, whether it be through AS, php, xml, sql, etc…I’ve seen it done. myspace.com is able to do this quite well, but I don’t really know what they’re using to make their design with…php I’d guess…but I’m not sure.

please help!:cubs:

They probably don’t use PHP.

In PHP, you could use the file(); method, then simply loop through the ones you wanted:

$contents = file('filename.html');
for ($i=12; $i<15; $i++) {
    echo $contents[$i]."
";
}