zoukankan      html  css  js  c++  java
  • As3支持的Html标签一览

    转载于:https://www.cnblogs.com/naiking/archive/2010/06/11/1756149.html

    一、Flash  支持的HTML标签和用法

    (1)Flash 支持的HTML标签
    1、<a> 超链接标签
    属性:
    href—— 链接地址
    target——目标窗口,可取值为_blank,_parent,_self,_top
    例:
    my_txt.htmlText=”<a href=http://hi.baidu.com/kmjy/creat/blog/’ target=’_blank’>开明教育</a>”

    2、<b> 粗体标签
    |例:
    my_txt.htmlText=”<b>粗体</b>”

    3、<br> 换行标签
    例:
    my_txt.htmlText=”第一行<br>第二行"

    4、<font> 字体标签
    属性:
    color——字体颜色,格式#RRGGBB
    face——字体,可以是单个字体或字体列表,字体名称
    size——字体大小,单位像素,数字
    例:
    my_txt.htmlText=”<font color=’#ff0000′ face=’Arial’ size=’12′>用HTML字体标签的效果</font>”

    5、<i> 斜体标签
    例:
    my_txt.htmlText=”<i>这里是斜体</i>”

    6、<li> 列表项标签
    例:
    my_txt.htmlText=”Sports:<li>列表项一</li> <li>列表项二</li><li>列表项三</li>”
    注意,文本属性要选中“多行”。
    不支持<ol> 和<ul>标签

    7、<p> 段落标记
    属性:
    align——对其方式,可取值left、right、center
    class——应用一个css样式类
    例:
    my_txt.htmlText=”<p align=’right’ class=’title’>右对齐</p><p align=’left’ class=’body’>左对齐</p>”
    注意,文本属性要选中“多行”。本例假设css类title和body已存在。

    8、<span> 标签
    说明:对位于该标签内所有文本应用css样式,只有在定义了css对象后有效。
    属性:class——应用一个css样式类。
    例:
    my_txt.htmlText=”<span class=’body’>应用CSS样式类</span>
    注意,本例假设css类body已存在。

    9、<u> 下划线标签
    例:
    my_txt.htmlText=”<u>添加下划线</u>

    两个特殊的标签:
    10、<img> 图像标签
    说明:这个标签的功能不仅仅是在文本框中插入图片,还可以插入SWF和MovieClip。
    属性:
    src—— 要加载的JPG或SWF的URL,或是MC的链接ID,这个属性是必要的,其他属性则可选。
    注意:Flash不支持progressive格式的JPG。
    id——指定嵌入了JPG,SWF或MovieClip的电影剪辑的名称。
    width——图片/动画宽度。
    height——图片/动画高度。
    align——对其方式,可取值:left,right,默认为left。
    hspace——文本环绕图时水平方向上与图片的空隙。
    vspace——文本环绕图时垂直方向上与图片的空隙。

    11、<textformat> 文本格式标签
    说明:这个标签可以让你直接应用一些TextFormat对象的属性到文本中。
    属性:
    blcokIndent: 段落缩进大小,单位像素。
    indent: 段落首行缩进大小,单位像素。
    leading: 文本行间距,单位像素。
    leftmargin: 文本左边距,单位像素。
    rightmargin: 文本右边距,单位像素。
    tabstops: 表格划分,单位像素。
    注意:关于属性tabstops:它的值是一个数组,用来表示表格的列划分情况。
    在文本中用转义字符 将输出位置移动到下一个制表位。

    例:
    tabField=”<b>姓名 性别 年龄 </b><br>”;
    tabRecord1=”唐家齐 男 21 <br>”;
    tabRecord2=”张晓明 女 18 <br>”;
    txt=”<textformat tabstops=’[50,150,150]‘>" + tabField + tabRecord1 + tabRecord2 + "</textformat>”;

    (2)在 Flash 8 如何使用HTML标签

    第一步:新建 Flash 文档,在舞台上创建一个动态文本框,设定实例名称为my_txt 。
    第二步:在第一帧加入AS代码:
    my_txt.html = true; //指定该文本字段为HTML文本字段。
    my_txt.htmlText= "<a href=’http://hi.baidu.com/kmjy/creat/blog/’ target=’_blank’>开明教育</a>"; //引用HTML的超链接标签。

    Flash CS3里可用的HTML标签和注意事项
    Adobe Flash播放器支持一组标准HTML标签, 例如<p>和<li>, 你可以把它们放在动态或输入框文本区内来格式化文字.

    Flash播放器版本7和后续版本也支持<img>标签. 你可以在文本区嵌入图片(JPEG,GIF,PNG)和SWF文件.

    Flash播放器自动把文字环绕在图片周围, 就像浏览器显示HTML页面时把文字环绕在图片周围那样.


    Adobe Flash Player supports a subset of standard HTML tags such as <p> and <li>, which you can use to style text in any dynamic or input text field. Text fields in Flash Player 7 and later also support the <img> tag, which lets you embed image files (JPEG, GIF, PNG), SWF files, and movie clips in a text field. Flash Player automatically wraps text around images embedded in text fields in much the same way that a web browser wraps text around embedded images in an HTML page.

    HTML tags supported by Adobe Flash CS3 Professional
    The following HTML tags are supported by Adobe Flash CS3 Professional. Optional tag attributes appear in brackets.

    引用内容 引用内容
    Anchor: <a href="/support/flash/ts/documents/url">
    Bold: <b>
    Font: < font [color="#xxxxxx"] [face="Type Face"] [size="Type Size"]>
    Italic: <I>
    Paragraph: <p [align="left"|"right"|"center"]>
    Underline: <u>
    Break: <br>
    Image: <img src="http://images.cnblogs.com/flash/dogs.jpg"/> The <img> tag lets you embed external image files (JPEG, GIF, PNG), SWF files, and movie clips inside text fields and TextArea component instances.
    List Item: <li>



    ordered and unordered lists (<ol> and <ul> tags) are not recognized by Flash Player, so they do not modify how your list is rendered. All list items use bullets.
    Span: The <span> tag is available only for use with CSS text styles.
    TextFormat: The <textformat> tag lets you use a subset of paragraph formatting properties of the TextFormat class within HTML text fields, including line leading, indentation, margins, and tab stops. You can combine <textformat> tags with the built-in HTML tags.

    引用内容 引用内容
    Additionally, Flash Player supports HTML entities:

    < < (less than)
    > > (greater than)
    & & (ampersand)
    " " (double quotes)
    &apos; ' (apostrophe, single quote)
    程序代码 程序代码


    如何使用Flash MX 2004所支持的HTML标签:
    第一步:新建一个FLASH文档,在舞台上插入一个动态文本框,并命名为 my_txt 。
    第二步:在第一帧加入AS代码:
    my_txt.html = true; //指定该文本字段为HTML文本字段。
    my_txt.htmlText="<a href=’http://www.flash8.net’ target=’_self’>闪吧</a>";
    //引用HTML的超链接标签。
    Flash MX 2004所支持的HTML标签:
    <a> 超链接标签
      属性:href: 链接地址
      target: 目标窗口 可取值为_blank,_parent,_self,_top。
      例:
      my_txt.htmlText="<a href=’http://www.flash8.net’ target=’_self’>闪吧</a>";
    <b> 粗体标签
      例:
      my_txt.htmlText="<b> 闪吧</b>";
    <br> 换行标签
      例:
      my_txt.htmlText="闪吧<br>";
    <font> 字体标签
      属性:color:字体颜色,格式#RRGGBB。
      face:字体,可以是单个字体或字体列表。
      size:字体大小,单位像素。
      例:
      my_txt.htmlText="<font color=’#ff0000’ face=’Arial’ size=’12’>闪吧</font>";
    <i> 斜体标签
      说明:
      例:
      my_txt.htmlText="<i>闪吧</i>";
    <li> 列表项标签
      例:
      my_txt.htmlText="Sports:<li>新手区</li> <li>教程区</li><li>资源区</li>";
      注意,文本框要选中“多行”。
    <p> 段落标记
      属性:align:对其方式,可取值left,right,center。
    class:应用一个css样式类。
      例:
      my_txt.htmlText="<p align=’right’ class=’title’>align right</p><p align=’left’ class=’body’>align left</p>";
      注意,文本框要选中“多行”。本例假设css类title和body已存在。
    <span> 标签
      说明:对位于该标签内所有文本应用css样式,只有在定义了css对象后有效。
      属性:class:应用一个css样式类。
      例:
      my_txt.htmlText="<span class=’body’>闪吧</span>";
      注意,本例假设css类body已存在。
    <u> 下划线标签
      例:
      my_txt.htmlText="<u> 闪吧</u>";
    <img> 图像标签
      说明:这个标签的功能不仅仅是在文本框中插入图片,还可以插入SWF和MovieClip。
      属性:src: 要加载的JPG或SWF的URL,或是MC的链接ID,这个属性是必要的,其他属性则可选。
      注意:Flash不支持progressive格式的JPG。
      id : 指定嵌入了JPG,SWF或MovieClip的电影剪辑的名称。
       图片/动画宽度。
      height: 图片/动画高度。
      align: 对其方式,可取值:left,right,默认为left。
      hspace: 文本环绕图时水平方向上与图片的空隙。
      vspace: 文本环绕图时垂直方向上与图片的空隙。
    例:
    my_txt.htmlText="<src=’my.swf’ width=’100’ height=’80’ align=’left’>";
    <textformat> 文本格式标签
      说明:这个标签可以让你直接应用一些TextFormat对象的属性到文本中。
      属性:blcokIndent: 段落缩进大小,单位像素。
      indent: 段落首行缩进大小,单位像素。
      leading: 文本行间距,单位像素。
      leftmargin: 文本左边距,单位像素。
      rightmargin: 文本右边距,单位像素。
      tabstops: 表格划分,单位像素。
      注意:关于属性tabstops:它的值是一个数组,用来表示表格的列划分情况。
      在文本中用转义字符 将输出位置移动到下一个制表位。
      例:
      tabField="<b>name Sex Age </b><br>";
      tabRecord1="rongsheng 20 Male <br>";
      tabRecord2="zjq 21 Female <br>";
      txt="<textformat tabstops=’[50,150,150]’>"+ tabField+tabRecord1+tabRecord2+"</textformat>";

    该贴引自 http://hi.baidu.com/flash%D6%AA%CA%B6/blog/item/e9ea78df0fd4cc3f5882dd0c.html 谢谢

  • 相关阅读:
    Object.Instantiate 实例
    .idata数据的解析
    数据结构-静态链表
    数据结构-循环链表
    Android---两个视图间的淡入淡出
    HDU 4597 Play Game 2013 ACM-ICPC吉林通化全国邀请赛H题
    Android 编译时出现r cannot be resolved to a variable
    找工作笔试面试那些事儿(5)---构造函数、析构函数和赋值函数
    SFINAE 模板替换失败而非报错的应用
    模板实参推导 & xx_cast的实现
  • 原文地址:https://www.cnblogs.com/dt1991/p/15047213.html
Copyright © 2011-2022 走看看