| 域名空间 下载中心 社区论坛 信息公告 my小屋 |
![]() |
联系我们 设为首页 加入收藏 |
|
首页 | 新闻资讯 | 编程开发 | 网页设计 | 图形图象 | 网络媒体 | 网站模板 | 数 据 库 | 投稿 论坛 | 操作系统 | 系统优化 | 网络安全 | 黑客技术 | 硬件学堂 | 硬件报价 | 服 务 器 | 地图 专题 | 应用软件 | 聊天通讯 | q q 专栏 | 建站经验 | 在线工具 | 站长club | 注 册 表 | 旧版 社会 | 游戏娱乐 | 设计欣赏 | 疑难解答 | 社区论坛 | 韩国素材 | 素材图库 | 广告服务 | 服务 |
| 新版上线![旧版] | |||||
注:打开慢时请稍等
flash mx 2004 显示外部css和html文件http://www.iyit.net 日期:2006-5-27 18:52:18 来源:网络转载 点击: |
实例 text enhancements 一、涉及特性 headline { font-family: arial,helvetica,sans-serif; font-size: 16px; font-weight: bold; display: block;}subheadline { font-family: arial,helvetica,sans-serif; font-size: 13px; font-weight: bold; display: block;}mainbody { font-family: arial,helvetica,sans-serif; font-size: 10px; display: block;}biline { font-family: arial,helvetica,sans-serif; font-size: 11px; font-style: italic; display: inline;}a { font-family: arial,helvetica,sans-serif; color:cccccc; font-size: 10px; display: inline; text-decoration:underline;} 上面的css文件中,中括号里面的是对应的属性。比如font-family是字符集,font-size是字体大小,display是字体的显示方式,等等。只要有简单的网页制作知识就应该可以看懂的。 2、新建一个文件,命名为sample.html,其内容如下: <body><headline>giant sea lion spotted</headline><subheadline>citizens scared, amazed</subheadline><biline>today - our city </biline><mainbody>a giant sea lion was spotted today rampaging around the city's main square,scaring thousands of innocent people just out for a daily stroll in the beautiful downtown district.<img align='right' src="http://www.iyit.net/files/beyondpic/2006-5/27/0652718515066357.jpg"/>no injuries were reported after the animal's two-hour assault of the shopping district famous for it's sea lion purses and shoes, also known as the "sea lion district". witnesses said the creature came out of the ocean near the burger king at 42nd and 1st avenue, startling many and stalling traffic. "the animal caused nearly four million dollars of damage to the neighborhood," said joseph valente, owner of "sea lions r' us" at 43rd and 2nd. onlookers to the scene said that the sea lion appeared ornery, but otherwise in good spirits. officials are uncertain as to when, if ever, the sea lion may return.<a href="http://www.macromedia.com">click here for more.</a> </mainbody></body> 这个文件的内容是应用了前面所创建的css格式的html文件。(严格来说,此文件更像是一个xml文件。) 3、将一个名为sample.jpg的图片放到跟第一、二步所创建的文件的同一目录中。 4、新建一个flash mx 2004的文件,保存在跟前面所创建的文件所在的目录中。 5、用文本工具在场景中拉一个文本输入框,命名为content。在属性面板上设置如1所示。 6、在timeline中新建一个图层,命名为action,在此层的action面板上面增加如下语句: /* copyright 2003 macromedia, inc. all rights reserved.the following is sample code and is subject to all restrictions on such code as contained in the end user license agreement accompanying this product.*/var ss:textfield.stylesheet = new textfield.stylesheet(); //注释1;定义一个变量ss,它的类型为textfield.stylesheet.ss.load("sample.css"); //注释2;读取sample.css文件的内容到ss中。这里要注意所有文件的保存路径要一致.content.stylesheet = ss;//注释3;设置文本框content的几个属性.content.multiline= true;content.wordwrap = true;content.html = true;story = new xml(); //注释4;创建一个xml对象.story.ignorewhite = true;story.load("sample.html"); //注释5;读入sample.html文件的内容到story中.story.onload = function () { //注释6;设置story的onload函数,函数的内容为设置content的htmltext为storycontent.htmltext = story;} 三、实际用途 从实例的制作过程中可以看到,以前在flash中一行一行地调整文字显示效果的时候再也不会出现。flash mx 2004中操作html文件非常灵活,修改显示效果也很方便,只要改一下相应的文件内容就可以了。这在用flash来做比较多的文字显示处理的场景中非常有用。 编辑:黑鹰 [发送给好友] [打印本页] [关闭窗口] [返回顶部] 上一篇:flash mx 2004 的历史面板(1) 下一篇:flash mx 2004 新模板应用(2) 转载请注明来源:www.iyit.net 特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。 |
| 最新更新 | 热点排行 | 推荐新闻 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
| 友情链接 | ||||||
| 设置首 页 - 版权声明 - 广告服务 - 关于我们 - 联系我们 - 友情连接 |
| |||||||