Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

һƪ¹ØÓÚ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"


Ïà¹ØÎĵµ£º

JavaÓëFlexÇø±ð¶þ£ºÕûÊý³ý·¨¡¢±äÁ¿¶¨Òå¡¢Êý×éȡֵ

ÔÚJavaÀïÃæ£¬Á½¸öÕûÊýÏà³ýµÃµ½ÊǸöÕûÊý£¬±ÈÈç int a = 28;
int b = 10;
a/b == 2; //true
ÔÚFlexÖУ¬ÉÏÃæJava´úÂ뽫·µ»ØÍ¬ÑùµÄ½á¹û¡£ÖµµÃ×¢ÒâµÄÊÇ£¬Èç¹ûʹÓõÄÊÇNumberÀ࣬ÔòÓÐËù²»Ò»ÑùÁË¡£ÏÂÃæµÄ´úÂëÖУ¬resultµÄֵΪ2.8¡£Èç¹ûÄ㲻СÐİѷµ»ØµÄ½á¹û×÷ΪÊý×éµÄË÷ÒýȥȡֵµÄ»°£¬ÄÇôʲô½á¹û¶¼Ã»ÓС£
var a:Number = 28 ......

flexͨ¹ýblazedsÓëjavaʵÏÖÔöɾ¸Ä²é Õû¸öʵÏÖÁ÷³Ì

1£¬½¨Ò»¸öuserdb¿â£¬ÔÙ½¨userinfo±í£¬×ֶΣºid(int),username(varchar),password(varchar)¡£
2£¬DBConnection.java
    package com.datainfo;  
 
  import java.sql.Connection;  
  import java.sql.DriverManager;  
  import java.sql.SQ ......

ÓÃFlexµ÷ÓÃSWF²é¿´PDF

  ÓÐʱºòһЩ×ÊÁÏÖ»Äܸø±ðÈË¿´£¬Èç¿É´òÓ¡µÄÎĵµÈçDOC£¬PDF£¬µ«²»ÄÜÈÃÆäËûÎÞȨÏÞµÄÈËÁí´æ»òÕß´òÓ¡£¬ÌرðÊÇweb°æµÄÎļþ¹ÜÀíÀàµÄϵͳ£¬×ܻῼÂǵ½Õâ¸öÎÊÌâ¡£µ±ÓÃIEÖ±½Ó´ò¿ªpdfµÄʱºò£¬¾¡¹Ü¿ÉÒÔÆ£±ÖIEµÄÁí´æÎª£¬µ«Êǵã»÷PDFÎļþµÄʱºò£¬ÔÙ°´F8µÄʱºò£¬PDFµÄÔĶÁÆ÷È磨adobereader£©»áÏÔʾToolsBar£¬ËùÒÔÖ±½Ó´ò¿ªpdfÃ²ËÆÐв ......

ÈçºÎÔÚFlex »ò ActionScriptÖдò¿ªWORD Doc

Adobe Flash Builder 4 ¼òÌåÖÐÎÄÕýʽ°æ ÏÂÔØ:
http://subject.csdn.net/adobedownload/index.html
ʹÓÃÏà¹ØµÄÓò£¬ÀûÓÃAdobe Livecycle Designer´´½¨Ò»¸öPDFÄ£×飬ÒÔXML½ÚµÄÃû³Æ£¨ÓëPDFÄ£×éÖеÄÓòµÄÃû³ÆÆ¥Å䣩ÏòPDFÔ¶³Ì¶ÔÏó·¢ËÍXMLÊý¾Ý£¬È»ºóÄúµÄFlexÓ¦ÓóÌÐò¾Í»á´ò¿ªPDF, »ò½«PDFÎļþ·ÅÈëÄúµÄwebserv ......

FlexµÄÀ¬»ø»ØÊÕ»úÖÆ

½ñÌìÔÚ×öÏîĿʱºò£¬ÔÚ¿ªÊ¼ÏîĿʱºòÓÐÒ»¸öºÜÖØÒªµÄÎÊÌ⣬¾ÍÊÇÔÚ×ö»ÃµÆµÄÏîĿʱºò£¬ÒòΪ³õʼ»¯µÄʱºò½«Í¼Æ¬È«²¿¼ÓÔØ½ø³ÌÐò£¬Ôì³ÉÏîÄ¿Æô¶¯µÄʱºò£¬»úÆ÷¾Í±ÀÀ£ÁË£¬ÒòΪÏîÄ¿ÒѾ­Íê³ÉÁË£¬Ö»ÄÜÏëһЩ²¹¾ÈµÄ·½·¨£¬¾ÍÊÇÀûÓÃflashplayµÄÀ¬»ø»ØÊÕ£¬ÒÔÏÂÊÇÁ½ÖÖ·½·¨¡£
1.   flash.system.System.gc();
2.   try
& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ