ÔÚflexµÄ¿ª·¢µ±ÖУ¬²»¿É±ÜÃâµÄÒª³ö´í£¬µ«ÊÇflashµÄ´íÎ󵯳öÕæÊÇÌ«ÏÅÈËÁË£¬Ò»µã¶¼²»ÓѺá£ÎÒÃÇÒªÔõôÀ´ÆÁ±ÎËü£¬µ¯³öÎÒÃÇÏëÒªµÄ¶Ô»°¿òÄØ£¿¹ý³ÌÖÐÓÐʲôҪעÒâµÄÄØ£¿
ÔÚjavaÀïÃæÎÒÃÇ´¦ÀíÒì³£µÄ·½·¨¾ÍÊÇtry{}catch(){}finally{}¡£ÎÒ³¢ÊÔ¹ýÕâÑùµÄ·½·¨¡£
FileReference f=new FileReference();
»á³ö´í£¬µ«ÊÇÓÃtry catchµÄ·½·¨ÊÇ×èÖ¹²»ÁËÏÅÈ˵ĽçÃæÔٴγöÏֵġ£ÔÒòºÜ¼òµ¥£¬ÒòΪµ¯³öµÄ´íÎóÊÇIOErroEvent¡£ÊÇÒ»¸öʼþ£¬ÔÚflexÀïÃ棬Òì³££¨exceptio£©ÊÇÓÃtry catchÀ´´¦ÀíµÄ£¬javaÒ²ÊÇÕâÑù£¬µ«ÊÇʼþÄØ£¬È´ÊÇÓÃListenerÀ´´¦ÀíµÄ¡£
f.addEventListener(IOErrorEvent.IO_ERROR,ioErroHandler);
ÕâÑù¾Í½â¾öÎÊÌâÁË¡£
»¹ÓÐÒ»¸öÎÊÌâÊÇ£¬listenerÌí¼ÓµÄ×é¼þ£¬Ó¦¸ÃÊÇÄĸö×é¼þ³ö´í¾ÍÌí¼Óµ½Ê²Ã´×é¼þÉÏÃæ¡£ÏñÉÏÃæµÄÀý×ÓÀïÃ棬Èç¹û°Ñlistener¼ÓÔÚFileReference ÍâÃæµÄ×é¼þÉÏÃ棬ÊÇûÓÐЧ¹ûµÄ¡£ ......
Ê×ÏȽ¨Á¢²å¼þÎļþ´æ·ÅĿ¼£º
D:\eclipse_plugins\flex3\eclipse\features
D:\eclipse_plugins\flex3\eclipse\plugins
ÒÔÉÏ·¾¶¸ù¾Ý±¾»úʵ¼ÊÇé¿öÈ·¶¨
È»ºó°ÑFlex Builder3 ÖеÄÎļþ¿½±´µ½¶ÔӦĿ¼Ï£º
D:\IDE\Flex Builder 3\features\com.adobe * -> D:\eclipse_plugins\flex3\eclipse\features
D:\IDE\Flex Builder 3\plugins\com.adobe * -> D:\eclipse_plugins\flex3\eclipse\plugins
½áÊøºó£¬ÔÚeclipseĿ¼Ï½¨Á¢Îļþ¼Ðlinks
È»ºó½¨Á¢Îļþflex.link
ÎļþÄÚÈÝΪ path=D:\\eclipse_plugins\\flex3
±£´æÎļþ
È»ºóÖØÐÂÆô¶¯eclipse£¬Äã»á·¢ÏÖFlex±»¼ÓÔؽøÈ¥ÁË
ÖÁÓÚ°²×°Flex Builder 3 µÄĿ¼£¬½¨Òé±£Áô£¬ÒòΪflex µÄ sdk»¹ÔÚÀïÃæ
×¢Ò⣺ÔÚ±à¼flex.linkÎļþʱ£¬Ò»¶¨²»ÒªÂ©Ð´“path=”£¬Õâ¾ÍÊÇÎÒµ±³õ·¸µÄ´íÎó£¬Íü¼ÇдÁË£¬ËùÒÔ£¬²»ÂÛ×öʲô£¬Ò»¶¨Òª×Ðϸ£¡ ......
Ò»¡¢×¼±¸¹¤×÷£º
ËùÐèÒªµÄÈí¼þ£º
Eclipse 3.5.2 : http://d2u376ub0heus3.cloudfront.net/eclipse/downloads/drops/R-3.5.2-201002111343/eclipse-SDK-3.5.2-win32.zip
Eclipse 3.5ºº»¯°ü£ºhttp://eclipse.stu.edu.tw/technology/babel/babel_language_packs/BabelLanguagePack-eclipse-zh_3.5.0.v20091121043401.zip
FlexBuilder3 beta2 ²å¼þ°æ: ed2k://|file|%5BFlex.Builder.3.Eclipse%E6%8F%92%E4%BB%B6%E7%89%88%5D.FB3_WWEJ_Plugin.exe|365201784|62707d4dba2f46e31f943d58904c955e|h=c3t7ufizhn2d2fv6jnpaocquyrgyean6|/
MyEclipse 7.0£ºed2k://|file|[MyEclipse].myeclipse-7.0-win32.exe|665499410|a9dbef5973806a4f50abc2f94ee3353d|h=56to6aiim4dnnutbut46qkchigjqcol4|/
BlazeDS.war£ºhttp://flexorg.wip3.adobe.com/blazeds/3.0.x/milestone/3978/blazeds-bin-3.2.0.3978.zip
Tomcat 6£ºhttp://labs.renren.com/apache-mirror/tomcat/tomcat-6/v6.0.26/bin/apache-tomcat-6.0.26-windows-x86.zip
¶þ¡¢°²×°¹ý³Ì£º
1. °²×°MyEclipse
2. °²×°FlexBuilder3 beta2 ²å¼þ° ......
ÔÚJavaÀïÃ棬Á½¸öÕûÊýÏà³ýµÃµ½ÊǸöÕûÊý£¬±ÈÈç int a = 28;
int b = 10;
a/b == 2; //true
ÔÚFlexÖУ¬ÉÏÃæJava´úÂ뽫·µ»ØͬÑùµÄ½á¹û¡£ÖµµÃ×¢ÒâµÄÊÇ£¬Èç¹ûʹÓõÄÊÇNumberÀ࣬ÔòÓÐËù²»Ò»ÑùÁË¡£ÏÂÃæµÄ´úÂëÖУ¬resultµÄֵΪ2.8¡£Èç¹ûÄ㲻СÐÄ°Ñ·µ»ØµÄ½á¹û×÷ΪÊý×éµÄË÷ÒýȥȡֵµÄ»°£¬ÄÇôʲô½á¹û¶¼Ã»ÓС£
var a:Number = 28;
var result:Number = a / 10; // result == 2.8
ÔÚJavaÖУ¬¶¨Òå±äÁ¿ÊÇÀàÐÍÔÚÇ°£¬±äÁ¿ÃûÔں󣬱ÈÈçint a¡£
ÔÚFlexÖУ¬¶¨Òå±äÁ¿ÊDZäÁ¿ÃûÔÚÇ°£¬ÀàÐÍÔÚºó£¬ÖмäÓ÷ֺŸô¿ª£¬¶øÇÒÇ°Ã滹±ØÐë¼ÓÉÏvar¡£±ÈÈç var i:int¡£
²»ÖªµÀÉè¼ÆActionScriptµÄÀÏʦΪʲôҪ²ÉÓÃÕâÖÖ·½Ê½£¬ÕâÑùÃ÷ÏÔÒª¶àÇü¸Ï¼üÅÌ£¬»¹Òª¶àÕ¼Óô洢¿Õ¼ä£¬Ôö¼ÓÁË̼ÅÅ·Å¡£¸Õ¸ÕдFlex´úÂëµÄʱºò£¬¾³£»¹ÊÇ°´ÕÕJavaµÄ·½Ê½À´¶¨Òå±äÁ¿ºÍ·½·¨£¬Èç¹ûÓÐЩ±àÒë´íÎ󣬿´¿´ÊDz»ÊÇÕâ¸öÔÒò¡£
ÔÚJavaÖУ¬Èç¹ûÓÃ-1È¥´ÓÊý×éÀïÃæÈ¡Öµ£¬»á·¢ÉúArrayIndexOutofBoundException£¬µ«ÊÇÔÚFlexÀïÃ棬Ëü²»»á·¢ÉúÒì³££¬Ö»ÊÇ·µ»ØNaN¡£Èç¹û·¢ÉúÆæ¹ÖµÄÎÊÌ⣬¿´¿´ÊDz»ÊÇÕâ¸öÔÒò¡£
ÒÔÉÏÄÚÈݶ¼ÊÇÔÚʵ¼ÊʹÓùý³ÌÖÐ×ܽáµÄ£¬¿Ï¶¨²»È«Ã棬»¹Çë¼ûÁ¡£ ......
ÔÚJavaÀïÃ棬Á½¸öÕûÊýÏà³ýµÃµ½ÊǸöÕûÊý£¬±ÈÈç int a = 28;
int b = 10;
a/b == 2; //true
ÔÚFlexÖУ¬ÉÏÃæJava´úÂ뽫·µ»ØͬÑùµÄ½á¹û¡£ÖµµÃ×¢ÒâµÄÊÇ£¬Èç¹ûʹÓõÄÊÇNumberÀ࣬ÔòÓÐËù²»Ò»ÑùÁË¡£ÏÂÃæµÄ´úÂëÖУ¬resultµÄֵΪ2.8¡£Èç¹ûÄ㲻СÐÄ°Ñ·µ»ØµÄ½á¹û×÷ΪÊý×éµÄË÷ÒýȥȡֵµÄ»°£¬ÄÇôʲô½á¹û¶¼Ã»ÓС£
var a:Number = 28;
var result:Number = a / 10; // result == 2.8
ÔÚJavaÖУ¬¶¨Òå±äÁ¿ÊÇÀàÐÍÔÚÇ°£¬±äÁ¿ÃûÔں󣬱ÈÈçint a¡£
ÔÚFlexÖУ¬¶¨Òå±äÁ¿ÊDZäÁ¿ÃûÔÚÇ°£¬ÀàÐÍÔÚºó£¬ÖмäÓ÷ֺŸô¿ª£¬¶øÇÒÇ°Ã滹±ØÐë¼ÓÉÏvar¡£±ÈÈç var i:int¡£
²»ÖªµÀÉè¼ÆActionScriptµÄÀÏʦΪʲôҪ²ÉÓÃÕâÖÖ·½Ê½£¬ÕâÑùÃ÷ÏÔÒª¶àÇü¸Ï¼üÅÌ£¬»¹Òª¶àÕ¼Óô洢¿Õ¼ä£¬Ôö¼ÓÁË̼ÅÅ·Å¡£¸Õ¸ÕдFlex´úÂëµÄʱºò£¬¾³£»¹ÊÇ°´ÕÕJavaµÄ·½Ê½À´¶¨Òå±äÁ¿ºÍ·½·¨£¬Èç¹ûÓÐЩ±àÒë´íÎ󣬿´¿´ÊDz»ÊÇÕâ¸öÔÒò¡£
ÔÚJavaÖУ¬Èç¹ûÓÃ-1È¥´ÓÊý×éÀïÃæÈ¡Öµ£¬»á·¢ÉúArrayIndexOutofBoundException£¬µ«ÊÇÔÚFlexÀïÃ棬Ëü²»»á·¢ÉúÒì³££¬Ö»ÊÇ·µ»ØNaN¡£Èç¹û·¢ÉúÆæ¹ÖµÄÎÊÌ⣬¿´¿´ÊDz»ÊÇÕâ¸öÔÒò¡£
ÒÔÉÏÄÚÈݶ¼ÊÇÔÚʵ¼ÊʹÓùý³ÌÖÐ×ܽáµÄ£¬¿Ï¶¨²»È«Ã棬»¹Çë¼ûÁ¡£ ......
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.SQLException;
public class DBConnection {
public static Connection getConnection() throws ClassNotFoundException,
SQLException {
Connection conn = null;
String driver = "com.mysql.jdbc.Driver";
String url = "jdbc:mysql://localhost:3306/userdb"; //²»Í¬Êý¾Ý¿â²»Í¬JDBC
String username = "sa";
&nb ......
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.SQLException;
public class DBConnection {
public static Connection getConnection() throws ClassNotFoundException,
SQLException {
Connection conn = null;
String driver = "com.mysql.jdbc.Driver";
String url = "jdbc:mysql://localhost:3306/userdb"; //²»Í¬Êý¾Ý¿â²»Í¬JDBC
String username = "sa";
&nb ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="initApp()">
<mx:states>
<mx:State name="index">
<mx:RemoveChild target="{loginPanel}"/>
<mx:AddChild position="lastChild">
<mx:Label text="»¶ÓÀ´µ½Ö÷Ò³" fontFamily="Georgia" fontSize="20"/>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function initApp():void{
lblCheckCode.text=GenerateCheckCode();
}
private function loginHandle():void
{
if(txtUsername.text==""||txtPassword.text==""){
Alert.show("Óû§Ã ......