Hello everybody!
I was wondering if there’s anyone who can help me out with this problem…
You see, I’m creating a guestbook where the entries are being loaded from a MySQL database into an text area component in flash mx 2004.
I just don’t know how to apply css to it.
The text component has the instance name ‘entries’
Here’s the code that is in a frame which loads all the entries to the text area:
[FONT=Courier New][INDENT]
function loadEntries(act, increment) {
// Define NumLow as a Number
num = new Number(_parent.NumLow);
// Act accordingly
if (act == "Next") {
// Add increment
_parent.NumLow = num+increment;
} else if (act == "Previous") {
_parent.NumLow = num-increment;
} else {
// Load default - i.e. 0
_parent.NumLow = 0;
}
// Update Statistics
_parent.read.low.text = _parent.NumLow;
_parent.read.high.text = Number(_parent.NumLow)+10;
// Show Please wait text
_parent.read.entries.text = "Loading entries... Please wait...";
// Begin Loading
myEntries = new LoadVars();
myEntries.ref = this;
myEntries.load("GuestBook.php?action=read&r="+random(999)+"&NumLow="+_parent.NumLow);
myEntries.onLoad = function(success) {
if (success) {
// Assign output to components and objects
entries.text = this.entries;
totalEntries.text = this.totalEntries;
//Update values to calculate prev/next button visibility
num = Number(_parent.NumLow);
var totalEntries = Number(this.totalEntries);
var total = num+increment;
//Hide/show next button
if (total<totalEntries) {
this.ref.next_button._visible = true;
} else {
this.ref.next_button._visible = false;
}
//Hide/show previous button
if (num == 0) {
prev_button._visible = false;
} else {
prev_button._visible = true;
}
}
};
}
// Load Default
_parent.read.loadEntries("Default", 10);
stop();
[/FONT][/INDENT]