主要议题:flex通过openAMF访问Java
运行环境:
1. Flash Builder 4.0
2. openAMF
openAMF
下载地址:
http://sourceforge.net/projects/openamf/files/openamf/1.0RC11/openamf-1.0RC11-examples.zip/download
在Flash Builder 4.0中编写一下代码
1.openAMF_Demo.mxml
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="initApp()"> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <fx:Script> <![CDATA[ public function initApp():void{ new Main(); } ]]> </fx:Script> </s:Application>
2. Main.as
.......................有事离开.明天继续