(thanks Ahmed ;))
I can see the image file, but I can’t see the text (inhoud). I took a look at the PHP file and changed “this.inhoud” to “this.inhoud0” (see the PHP file’s output). This worked, but I wanted it to change automatically, so I tried “inhoud = this.inhoud+this.i” (i is 0, see PHP file’s output). This doesn’t work, instead of this.inhoud0 it becomes 0. Why ?
And how do I make the textfield scroll AND have it render as HTML ?
lv = new loadVars();
lv.onLoad = function(success) {
if (success) {
//this.i is the variable, i is a textfield
i = this.i;
inhoud.html = 1
inhoud.htmlText = this["inhoud"+i]
img.loadMovie("http://users.pandora.be/voetsjoeba/eclipse.jpg");
} else {
trace("failed to load script");
}
};
lv.load("http://voetsjoeba.asianillusion.com/news.php");
and make sure you have a textfield with an instance name of ‘inhoud’… to make it scroll, add the scrollbar component onto the textfield
Could you give me a hint on making a news thingie like the following…
In my frontpage I have a box in which I print 7 most recent news headlines from mySQL with PHP, sorted by date and limited to 7.
Ok. That works fine. What I would like to do is that when for example the first headline is clicked, I get the first news item opened. If the fourth headline is clicked tha fourth item is opened and so on.
That shouldn’t be too hard, but I can not get it working with Flash.
when user click in a item, u have to send a variable to php script and in script u have to verify what item the user have selected and change the SQL instruction with ORDER BY and send again to flash the new result
I’m not quite sure how to tell flash that some exact textfield in a movieclip is supposed to print out the newsitem defined earlier.
http://www.macromedia.com has the sort of thing I’m talking about on their front page. Every headline is a link and from a certain link, a certain newsitem is displayed. I just want the item to be displayed in flash.
ok, I sort of got working. It works fine but not dynamically enough.
I fatched the max value of the newsID cell and in order to get for example the second latest news item i just decrement 1 from the max value and print my item out like that.
It sucks 'cause I have to code all the items separately and use separate php files or the “switch” -method or something. I’m really poor with php and Flash:(
Man, if someone out there has an idea on how to do this, pls share your thoughts on a bit more precise level…
Thanks in advance, these forums are really good and I greatly appreciate everyone here. Let’s keep up the work!