---
title: "flex笔记--安装与项目建立"
author: "bndis"
date: "2012-07-02T10:25:01Z"
tags: []
categories: ["非技术"]
slug: "flex"
draft: false
lastmod: "2012-07-02T10:25:01Z"
id: 1573738
url: "https://bndis.iteye.com/blog/1573738"
---


　　使用java做后台，采用Eclipse插件式安装 
　　操作系统：win7 
　　服务器：tomcat6 
　　其他：myeclipse7.0、blazeDS 
　　安装： 
　　首先安装好myeclipse，其次安装flash builder插件，安装插件时需选择myeclipse安装路径，选择到下一级有dropins的文件夹，否则无法安装。 
　　建立项目： 
　　本项目通过blazeDS使flex与java通信 
　　1.新建flex项目。 
　　
　　2.点击next，如果没有建立服务器，需要新建服务器 
　　
　　
　　3.选择好blazeDS文件 
　　
　　4.完成， 
　　
　　5.编写简单java端，提供数据 package com.flex; public class FlexTest { public String hello(String name){ System.out.println("process request..."); return "Hello " + name; } }  6.在remoting-config.xml中添加配置文件信息，使flex可以访问java端   com.flex.FlexTest    7.编写flex的mxml文件，注意mx:RemoteObject中的destination值为remoting-config.xml配置的id  flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" width="573" height="314">        width="48" height="17"/>      8.修改services-config.xml中的server.name、server.port、context.root，否则需在编译时指定 
