点集贵州电脑网
 
 
 梦想之源 ›› 灌水专区 ›› GWT2SWF——Java开源GWT与FLASH/FLEX集成工具包 版主:
灌水专区
新建论坛
申请免费TS
1 / 1 页
<< 1 >>
跳转
 主题:GWT2SWF——Java开源GWT与FLASH/FLEX集成工具包
 
 狄丝
发表时间:[2007-08-08 01:25:38] [向作者发站内短信] [复制链接告诉朋友]
等 级:准尉
经 验:5345
性 别:美女
文 章:711
精 华:40

GWT2SWF :GWT与FLASH/FLEX集成工具包。

官方网站:http://gwt2swf.sourceforge.net/


下载地址:http://sourceforge.net/project/showfiles.php?group_id=189157

Quick start
First of all you should download:

GWT2SWF Library
GWT2SWF Hello World - sources for following example
Step 1. Let’s create new project in eclipse, name it 'gwt2swf-helloworld'.
  Using gwt tool create project

./projectCreator 
	-eclipse gwt2swf-helloworld 
	-ant gwt2swf-helloworld 
	-out ~/workspace/java-eclipse/gwt2swf-helloworld 
	-overwrite	
  and create new application

./applicationCreator 
	-eclipse gwt2swf-helloworld 
	-out ~/workspace/java-eclipse/gwt2swf-helloworld 
	pl.rmalinowski.gwt2swf.client.GWT2SWFHelloWorld
  Now add new library to project (Eclipse menu-> Project propertis -> java build files -> librarys -> Add Jar -> gwt2swf.jar
Step 2. Refresh Eclipse. You shold see 'GWT2SWFHelloWorld.java' in 'pl.rmalinowski.gwt2swf.client' package.

package pl.rmalinowski.gwt2swf.client;

import pl.rmalinowski.gwt2swf.client.ui.SWFWidget;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;

/**
 * Entry point classes define onModuleLoad().
 */
public class GWT2SWFHelloWorld 
	implements EntryPoint, ClickListener {

	private final Button addNewSwf = new Button("Add new SWF");

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {

		RootPanel.get().add(addNewSwf);
		addNewSwf.addClickListener(this);

	}

	public void onClick(Widget sender) {

		SWFWidget swfWidget = 
			new SWFWidget("hello.swf", //swf name
				new Integer(200),  //swf width
				new Integer(150)); //swf height

		// Fist you must add swfWidget to RootPanel
		RootPanel.get().add(swfWidget);
		// And after that you can safety show swf movie
		swfWidget.show();
	}

}
  and lunch projekt now. You should see this.


上帝给我大脑于是我思考,上帝给我双腿于是我奔跑,上帝给我十指,于是我上网.经过思考后,我奔跑着来上网!

 楼主更多新贴 :  
★冰雨轩TS绿化版下载及使用教程
游戏地带魔兽世界英雄榜签名图片生成器
主题活动VIP收费TS,您明智的选择!
游戏地带CT_RaidTracker魔兽世界3.0中文版下
1 / 1 页
<< 1 >>
跳转
  快速回复
  帐号: 密码: 匿名不登陆
回复内容:  
验 证 码:
 
 
·VIP收费TS,您明智的选择!
·9800GT+19'液晶DIY仅售3500元
·双核特惠:1999、2999、3999
·什么是点金积分,如何查看自
·团购一期:三星R458-DS0G+高
  
贵州点集科技发展有限责任公司·点集贵州电脑网 版权所有©2006-2008
中华人民共和国增值电信业务经营许可证 黔B-20070010号
客服QQ: 93804809818866281927205370
电子邮件: deangi@vip.sina.com
技术支持: 0851-5109268