Today - Our City 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.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.Click here for more. 这个文件的内容是应用了前面所创建的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(); //注释1ss.load("sample.css"); //注释2content.styleSheet = ss; //注释3content.multiline= true;content.wordWrap = true;content.html = true;
story = new XML(); //注释4story.ignoreWhite = true;story.load("sample.html"); //注释5story.onLoad = function () { //注释6 content.htmlText = story;}注释1:定义一个变量ss,它的类型为TextField.StyleSheet。注释2:读取sample.css文件的内容到ss中。这里要注意所有文件的保存路径要一致。注释3:设置文本框content的几个属性。注释4:创建一个xml对象。注释5:读入sample.html文件的内容到story中。注释6:设置story的onLoad函数,函数的内容为设置content的htmlText为story。三、实际用途从实例的制作过程中可以看到,以前在Flash中一行一行地调整文字显示效果的时候再也不会出现。Flash MX 2004中操作HTML文件非常灵活,修改显示效果也很方便,只要改一下相应的文件内容就可以了。这在用Flash来做比较多的文字显示处理的场景中非常有用。
0 xmlscript.src="http://guide.pconline.com.cn/comment/commentService_js.jsp?"+(new Date());