һƪ¹ØÓÚflexÓëÊý¾Ý¿â½»»¥µÄÀý×Ó£¨×ª£©
Ê×ÏÈÒªÇó´ó¼Òµ½Êý¾Ý¿â½¨Á¢Ò»¸öÊý¾Ý¿â£¬ÔÚÎÒÕâÀý×ÓÖÐÊý¾Ý¿âÃûΪuserDb,½¨Á¢Ò»¸ö±íuserInfo£¬ÀïÃæÉèÖÃÁ½¸ö×Ö¶ÎÒ»¸öΪid£¬Ò»¸öΪname¡£
´´½¨ÒÔÏÂjava´úÂëÔÚsrcĿ¼ÏÂ
User.java
package org.rjb.java;
public class User {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name=name;
}
}
UserDao.java
package org.rjb.java;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
public class UserDao {
public static Connection getConnection() {
Connection c = null;
try{
String driver = "com.mysql.jdbc.Driver";
String url = "jdbc:mysql://localhost:3306/userDb";
String username = "root";
String password = "1235";
Class.forName(driver);
c=DriverManager.getConnection(url,username,password);
} catch (Exception e) {
System.out.println(e.getMessage());
}
return c;
}
public List getAllUser() throws SQLException{
Connection c = getConnection();
Statement st = c.createStatement();
ResultSet rs = st.executeQuery("select * from UserInfo");
ArrayList userList = new ArrayList<User>();
while(rs.next()) {
User u=new User();
u.setName(rs.getString("name"));
userList.add(u);
}
return userList;
}
}
ÒÔÉÏÊÇjava¶ËµÄÈ«²¿´úÂëÁË£¬ÏÂÃæÊÇflex¶ËµÄ´úÂë¡£
´´½¨ÒÔÏ´úÂëÔÚflex_srcÏ£º
User.as
package org.rjb.flex{
[RemoteClass(alias="org.rjb.java.User")]
public class User {
private var _name : String;
public function User(){}
public function get name() : String {
return this._name;
}
public function set name(name : String) : void {
this._name=name;
}
}
}
½ÓÏÂÀ´ÊÇmxml´úÂ룬Ҳ¾ÍÊÇÎÒÃÇÕæÕýչʾÎÒÃÇÊý¾ÝµÄ½çÃæ
FlexWithJava.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
Ïà¹ØÎĵµ£º
±¾Ìû×îºóÓÉ flashyiyi ÓÚ 2009-2-22 23:18 ±à¼
×îÖÕÎÒ¾ö¶¨»¹ÊÇÓÓÒþ²Ø”Õâ¸ö²»ÊǺܺÏÊʵĴʡ£mx_internalÊÇÒ»¸ö×Ô¶¨ÒåÃüÃû¿Õ¼ä£¬ÖÁÓÚ“ÃüÃû¿Õ¼ä”µ½µ×ÊÇʲô¾Í²»ÔÚÕâÀï˵ÁË¡£×ÜÖ®£¬µ±ÎÒÃÇÔÚ´úÂëÍ·²¿Ð´ÉÏ£º
use namespace mx_internal
£¨Èç¹ûÊÇ.ASÎļþ£¬ÐèÒªÊÖ¶¯import mx.core.mx_internal£¬×¢ ......
ÕâÀï·ÖÁ½ÖÖÇé¿ö£¬Ò»ÖÖÊÇÊý¾ÝÔ´ÔÚMXMLÎļþÖУ¬È磺
<mx:XML id="treeXML"
format="e4x">
<root>
<node label="֪ͨͨ¸æ¹ÜÀí"
data="0">
......
ÓÐʱºòһЩ×ÊÁÏÖ»Äܸø±ðÈË¿´£¬Èç¿É´òÓ¡µÄÎĵµÈçDOC£¬PDF£¬µ«²»ÄÜÈÃÆäËûÎÞȨÏÞµÄÈËÁí´æ»òÕß´òÓ¡£¬ÌرðÊÇweb°æµÄÎļþ¹ÜÀíÀàµÄϵͳ£¬×ܻῼÂǵ½Õâ¸öÎÊÌâ¡£µ±ÓÃIEÖ±½Ó´ò¿ªpdfµÄʱºò£¬¾¡¹Ü¿ÉÒÔÆ£±ÖIEµÄÁí´æΪ£¬µ«Êǵã»÷PDFÎļþµÄʱºò£¬ÔÙ°´F8µÄʱºò£¬PDFµÄÔĶÁÆ÷È磨adobereader£©»áÏÔʾToolsBar£¬ËùÒÔÖ±½Ó´ò¿ªpdfòËÆÐв ......
Flex Builder 3.0 For Eclipse 3.3 °²×°·½·¨
Flex Builder 3.0 For Eclipse 3.3 °²×°·½·¨
ÕâÁ½Ìì×¼±¸Ñ§Ï°Flex,ÓÚÊÇÏÂÔØÁËFlex Builder 3.0 For Eclipse plugin×¼±¸°²×°.
µ«ÊÇ°²×°ºóÆô¶¯Eclipse,ÕÒÁË°ëÌìҲûÕÒµ½Flex.¶øÇÒFlex Builder»á°ÑJREÒ²°²×°.¾õµÃÕâÑùºÜ²»Ë¬.
ËùÒÔÎÒÏëµ½Äܲ»ÄÜÀ´¸öFlex BuilderÂÌÉ«°²×°·½ ......
½ñÌìÔÚ×öÏîĿʱºò£¬ÔÚ¿ªÊ¼ÏîĿʱºòÓÐÒ»¸öºÜÖØÒªµÄÎÊÌ⣬¾ÍÊÇÔÚ×ö»ÃµÆµÄÏîĿʱºò£¬ÒòΪ³õʼ»¯µÄʱºò½«Í¼Æ¬È«²¿¼ÓÔؽø³ÌÐò£¬Ôì³ÉÏîÄ¿Æô¶¯µÄʱºò£¬»úÆ÷¾Í±ÀÀ£ÁË£¬ÒòΪÏîÄ¿ÒѾÍê³ÉÁË£¬Ö»ÄÜÏëһЩ²¹¾ÈµÄ·½·¨£¬¾ÍÊÇÀûÓÃflashplayµÄÀ¬»ø»ØÊÕ£¬ÒÔÏÂÊÇÁ½ÖÖ·½·¨¡£
1. flash.system.System.gc();
2. try
& ......