Hi,
Currently, I am trying to use MX to communicate with JSP to call out the data from the MYSQL database and display the data. But I received no data when I run my project. The below is my logic and program flows. I think it is correct. If anyone of u found that is wrong, kindly do correct my mistake. U can send to my email address at [email protected].
I created 3 files as decribed below:
- JSP
- Class (bean file) (path:WEB-INF/Classes/)
- SWF & FLA file in Macromedia Flash.
The FLA file will called the Class file to query for results.
The JSP and Bean files are created under Forte and all are stored in the same directory. So, after I published the FLA files, then I run the html files (which is with FLA embeded inside the HTML) in Forte. Then, nothing is displayed, I can only see my design.
Action Script’s Codes Here>>>
function showContent() {
        var i;
        content.htmlText = “”;
        for (i=0; i < this.n; i++) {
                if (this[“picFile”+i] != “”) {
                        content.htmlText += “" + this[“firstName”+i] + " " + this[“lastName”+i] + "” + “<a href='asfunction:showjpg,” + this[“picFile”+i] + “#” + escape(this[“caption”+i]) + “’> (<font color=’#0000cc’>pic</font>)</a>”;
                } else {
                        content.htmlText += “" + this[“firstName”+i] + " " + this[“lastName”+i] + "”;
                }
                content.htmlText += " " + this[“phone”+i] + “”;
                content.htmlText += " <a href=‘mailto:" + this[“email”+i] + "’>" + this[“email”+i] + “</a>”;
        }
}
// Create new load vars object c for data transfer
var c = new LoadVars();
c.onLoad = showContent; // showContent is a fuction name
        tabA.onRelease = function() {
                content.htmlText = "Loading data for "; //+ c.thisLetter;
                // scope of this function is main timeline so can refer to c directly
                c.sendAndLoad(“index.jsp”,c,“POST”);
        }
//}
stop();