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
 
Ïà¹ØÎĵµ£º
×òÌìÍíÉÏÒ»Ö±ÔÚ×ÁÄ¥Flex,Ïëͨ¹ýDataGrid°ÑMySQLÀïÃæµÄÊý¾Ý¸ø¶Á³öÀ´£¬ÆÚ¼ä³öÏÖÁ˼¸¸öСÎÊÌ⣬¼Ç¼ÏÂ~~
1.µÚÒ»´Î½øÐÐÁ¬½ÓÊý¾Ý·þÎñ(Data-Connect to Data/Service-PHP-Browse)ʱ,»á³öÏÖ°²×°Zend FrameWork,Ñ¡Ôñok,²»ÒªÊºóÔÙÈ¥ÍøÕ¾ÏÂÔØZendAMF,Õâ¸öÀïÃæ»áÉÙһЩ¶«Î÷.
2.Data-Bind to DataÊ ......
ÓõÄÊÇMySQLÊý¾Ý¿â¡£
1£¬½¨Ò»¸öuserdb¿â£¬ÔÙ½¨userinfo±í£¬×ֶΣºid(int),username(varchar),password(varchar)¡£
create database userdb;
use userdb;
create table userinfo(
id int(10) not null auto_increment,
username varchar(20),
password varchar(20),
primary key(id));
2£¬DBConnection.jav ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="vertical" creationComplete="initApp()">
<mx:states>
<!--н¨“index”State-->
<m ......
ʹÓÃflexµÄ³É±¾
FLexÓïÑÔ±¾ÉíÃâ·Ñ¿ªÔ´
LCDS:
×ö remote object access serviceµÄ,˵¼òµ¥µã¾ÍÊǹµÍ¨ºǫ́javaºÍǰ̨flexÖ±½ÓµÄÇÅÁº
adobe¹Ù·½µÄ¶«Î÷,ÊÕ·Ñ,ºÜ¹ó
BDS: ¿ªÔ´Ãâ·Ñ,»ù±¾ÉÏ¿ÉÒÔÍêÈ«Ìæ´úLCDS,Ò²ÊÇadobe¹Ù·½µÄ¶«Î÷,¹À¼ÆÊÇLCDSûÈËÓÃ,ËûÓÖ²»ºÃÒâ˼ֱ½ÓÃâ·Ñ¸ã³öÀ´µÄ¶«Î÷
JRUN: Ó¦Ó÷þÎñÆ÷,Ò²ºÜ ......