Flexµ÷ÓÃflash
FlexÊÇ¿ª·¢RiaµÄÀûÆ÷£¬FlashÔÚ¶¯» ÓÎÏ·µÈ·½Ãæ½ÏÇ¿´ó£¬¿ÉÒÔÖÆ×÷³ö¸üÉú¶¯ ÐÎÏ󣬸»ÓÐÀÖȤÐԵĽ»»¥²úÆ·À´¡£
ÔÚ¶àÊýÇé¿öÏÂÐèÒª2Õß½áºÏ¡£
Á½ÕßÖ®¼äµÄͨѶÊÇÒÀ¿¿Ê¼þ»úÖÆÍê³ÉµÄ¡£
ÒÔϵÄÀý×ÓÊÇ£ºFlashÌá½»Êý¾Ý¸øFlex£¬Flex¸Ä±äFlashµÄÊý¾Ý¡£
1£ºFlash CS4¹¤¾ß´ò¿ª
°´ÈçÏ ÊôÐÔ ÖÆ×÷½çÃæ
2£º°´ F9 £¬ÊäÈëÒÔÏ´úÂ룺
//Ìá½»°´Å¥ À´¹ã²¥Ò»¸ö ʼþ¸øFlex
subBtn.addEventListener(MouseEvent.CLICK,sendToFlexHandler);
var resultFlash:int=10;
function sendToFlexHandler(evt:MouseEvent):void
{
//¹ã²¥ÁË FlashSended ʼþ
dispatchEvent(new Event("FlashSended"));
}
//ÓÃÓÚ¸øflex ´«ÖµµÄ ½Ó¿Ú
function getResult():int
{
return resultFlash;
}
3£º²âÊÔ ·¢²¼
ÏÂÃæÀ´½²½²FlexµÄµ÷ÓÃFlash²¢Í¨Ñ¶
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import flash.events.Event;
private function init():void
{
//ÊÇ swfLoaderµÄcontentÊôÐÔÀ´ÕìÌý FlashÄÚÈÝµÄ Ê¼þ
sl.content.addEventListener("FlashSended",FlashSendedHandler);
}
private function FlashSendedHandler(evt:Event):void
 
Ïà¹ØÎĵµ£º
ÔÚjavaÏîÄ¿¼¯³Éflex¿ª·¢ÔÚweb2.0ÊÇÊÇÒ»¸öÊ®·ÖÓмÛÖµµÄ¿ª·¢·½°¸£¬ÌرðÔÚÆóÒµ¼¶µÄÓ¦ÓÃÖУ¬flexºÍjava¼äµÄͨѶԽÏÔÖØÒª¡£µ«ÊÇÏÖÔÚµÄjavaºÍflexµÄ¿ò¼ÜËäÈ»¶à£¬µ«Êǹ²Í¨ÐÔ²»´ó¡£¾ÍÊÇͨ¹ý´«Í³µÄwebserviceµ÷Óã¬Ò²ÒòΪЧÂÊÎÊÌâºÍ½âÎöxmlµÄ·±ÖصŤ×÷£¬ºÜ¶àÏîÄ¿¿ª·¢ËٶȺÍά»¤ÏÞÖƽϴó¡£ÔÚ½üÀ´ÏîÄ¿£¬ÎÒÔÚ¹«Ë¾³¢Ê ......
flex¶àÎļþÉÏ´«¹¤¾ß£¨×ÔÓã©
JAVAÀà
package com.shine.framework.flexUpload;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Iterator;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet; ......
£¨×ª£©javaÓëflexͨÐÅ
Ò»¡¢×¼±¸£º
·þÎñ¶Ë£ºJDK1.5 £¨Õâ¸ö²»ÓýéÉÜÁË°É£¿£©
·þÎñ¶ËIDE£ºeclipse £¨ËüµÄÖ÷Ò³£©
¿Í»§¶Ë£ºFLEX 3 £¨Adobe® Flex® 3 ÊÇÓÃÓÚ¹¹½¨ºÍά»¤ÔÚËùÓÐÖ÷Òªä¯ÀÀÆ÷¡¢×ÀÃæºÍ²Ù×÷ϵͳһÖµز¿ÊðµÄ¼«¾ß±íÏÖÁ¦µÄ Web Ó¦ÓóÌÐòµÄ¸ßЧÂʵĿª·ÅÔ´Âë¿ò¼Ü¡££©
¿Í»§¶ËIDE£ºFlex Builder 3 ......
ÔÚÏîÄ¿ÖÐ×Ô¶¨ÒåÒ»¸öCheckboxGroup£¬Õâ¸ö¿Ø¼þÀïÃæ°üº¬¶à¸öCheckboxÏë¿ØÖÆCheckboxµÄÐÐΪ£ºËùÒÔʹÓòéÕÒһϰïÖúʹÓÃflexÖоµä·½·¨£ºgetDefinitionByName º¯ÊýµÄʹÓÃ
public function getDefinitionByName(name:String):Object
·µ»Ø²ÎÊý name ÖÐÖ¸¶¨µÄÀàÒýÓÃ
²ÎÊý name:String - ÀàÃû³Æ
·µ»Ø Object - ·µ»Ø²ÎÊý name ÖÐ ......