选择显示字体大小

flashmx2004系列教程〈二〉ui组件-windows component

widows components包含一个可以拖动的form,通常还要有一关闭按钮链接到scrollpane。你可以在其中显示form, movieclip,还有外部的swf文件,它不象scrollpane组件那样可以自动的对其中的内容进行滚动拖动,要想实现此功能,你必须将你要显示的内容放在scrollpane组件中然后在载入到windows components.同时你还要知道的是windows components 组件不能显示通过contentpath属性载入的外部内容的form.

1.新建一个文档,在类型中选择flash form application.

740)this.width=740" border=undefined twffan="done">

2.使用下图做为截图,进行参考布局。

740)this.width=740" border=undefined twffan="done">

3。创建一个新层,上层命名为action.下层命名为component.

4.拖动一个button组件至场景的component层,将其实例名命名为showwindowbutton.并将label设为show window.

740)this.width=740" border=undefined twffan="done">

5.点击如下图所示的+号,加入一个form.默认下为form1.通常在真正的程序编写中我们要为其另外命名。

740)this.width=740" border=undefined twffan="done">

6。单击form1,将其层命名为form content.

740)this.width=740" border=undefined twffan="done">

7.保证form1仍处于选中状态,选择文件导入,导入我们将要显示的文件,本例为loader_content.swf.

740)this.width=740" border=undefined twffan="done">

 

8.打开属性面板,设置form1的visible属性为false。因为我们要实现的是点击完show window按钮它才是可见的。

740)this.width=740" border=undefined twffan="done">

 

9.单击左侧的应用程序表单,将windows组件拖至场景的component层上,然后删除,我们只需要让它在库中即可。

10。在应用程序的场景的action层上输入如下代码。

buttonlistener = new object();
buttonlistener.click = function() {
 mywindow = mx.managers.popupmanager.createpopup(form1.rootscreen,

mx.containers.window,

false,

{title:"a kitty with an attitude", contentpath:"form1" }

);
 mywindow.setsize(320, 240);
};
showwindowbutton.addeventlistener("click",buttonlistener);

11。测试影片。

  


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons