[Flash CS3] IE Problems with Flash

Hello,

I’ve never had a problem with Flash acting differently in two different browsers. Bad Flash! Shame on you Flash!

Anyway, let me explain with out trying to write a novel here…

Part of my little application here is for users to read and add “comments”.

The comments are stored in a database. When my Flash movie loads it calls an ASP script which reads the database and sends Flash a stream of XML data. Flash then puts the XML data into an array. This array is used to populate dynamic HTML text boxes where the user can see the comments.

When a user adds a comment it is sent via sendAneLoad to an ASP script and then written to a database. When it successfully loads. The movie recalls the original script to pull the comments from the database and updates the comments array so the user who just added a comment instantly sees the comment they just add. This all works like a charm in Firefox. Praise Firefox! All of this works in IE except when it tries refreshing the comments after one is added.

Here’s the code:

Refreshing comments:


function refreshComm() {
    //clear comments array
    comments="";
    comments = new Array();
    refreshComments = true;
    getComments();
}

function getComments() {
    //import comments from database
    commXML = new XML();
    commXML.ignoreWhite=true;
    commXML.load("getComments.aspx?ezineid=1");
    commXML.onLoad=processCommentData;
}

function processCommentData(success) {
  if (success) {
    for (var i = 0; i < commXML.firstChild.childNodes.length; i++) {
    //fill comments array          
   comments.push(new ccomment(commXML.firstChild.childNodes*.attributes.UserID, commXML.firstChild.childNodes*.attributes.CommentDay, commXML.firstChild.childNodes*.attributes.CommentText, commXML.firstChild.childNodes*.attributes.PageNum));
    }
    if (refreshComments == true) {
        readComments()
    }
  } else {
    errorMsg = "Comments Failed"
  }
}

function readComments() {
    commBox1.commTextBox.htmlText = "";
    for (var i = 0; i < comments.length; i++) {
        //Display comments (There is some user related stuff I'm leaving out)
            commBox1.commTextBox.htmlText += "<p><font color='#990000'><b>" + users[userIndex].firstName + " " + users[userIndex].lastName + "</b></font> wrote: " + comments*.commDay + "</p>";
            commBox1.commTextBox.htmlText += "<p>" + comments*.comm + "</p><p></p>";
            commBox1.commTextBox.htmlText += "<p><i>- " + users[userIndex].schoolName + ", " + users[userIndex].email + "</i></p>";
            commBox1.commTextBox.htmlText += "<p><font color='#666666'>______________________________________________</font></p><p></p>";
        }
    }
}

I have confirmed that IE calls the refreshComm() function, but doesn’t do any of the things inside it, like calling the rest of these functions. If any one has a guess why IE does not like this code please let me know.

Thank you!