Flash Player 支持以下 HTML 标签

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9

Flash Player 支持以下 HTML 标签:

标签 Description
锚标签 <a> 标签创建超文本链接并支持以下属性:

  • href:该 URL 可以是绝对路径或相对路径(相对于加载页的 SWF 文件的位置)。 http://www.adobe.com 示例表示对 URL 的绝对引用;/index.html 示例表示相对引用。 绝对 URL 必须以 http:// 为前缀,否则 Flash 会将其视为相对 URL。
  • event:使用 event 属性 (attribute) 来指定在用户单击超文本链接时调度的 link TextEvent 的 text 属性 (property)。 例如 event:myEvent;在用户单击此超文本链接时,文本字段会调度其 text 属性设置为 "myEvent"link TextEvent。
  • target:指定加载页面的目标窗口的名称。 选项包括 _self_blank_parent_top_self 选项指定当前窗口中的当前帧,_blank 指定一个新窗口,_parent 指定当前帧的父级,而 _top 指定当前窗口中的顶级帧。

可以使用 link 事件来使链接在 SWF 文件中执行 ActionScript 函数,而不是打开 URL。

还可以使用样式表为锚标签定义 a:linka:hovera:active 样式。

粗体标签 <b> 标签以粗体形式呈现文本。 粗体必须可用于所使用的字体。
换行标签 <br> 标签将在文本字段中创建一个换行符。 若要使用此标签,您必须将文本字段设置为多行文本字段。
字体标签 <font> 标签指定一种字体或一个字体列表来显示文本。字体标签支持以下属性:

  • color:只支持十六进制颜色 (#FFFFFF) 值。
  • face:指定要使用的字体的名称。 如下例所示,您可以指定一个以逗号分隔的字体名称的列表,在这种情况下,Flash Player 选择第一个可用字体。 如果用户计算机系统上没有安装指定字体,或指定字体未嵌入 SWF 文件中,则 Flash Player 将选择替代字体。
  • size:指定字体的大小。 您可以使用绝对像素大小(如 16 或 18),也可以使用相对磅值(如 +2 或 -4)。
图像标签 使用 <img> 标签可将外部图像文件(JPEG、GIF、PNG)、SWF 文件和影片剪辑嵌入到文本字段中。 在文本字段中,文本在嵌入的图像旁自动换行。 若要使用该标签,必须将文本字段设置为多行和文本换行。<img> 标签支持以下属性:

  • src:指定图像或 SWF 文件的 URL,或库中影片剪辑元件的链接标识符。 此属性是必需的,所有其它属性都是可选的。 外部文件(JPEG、GIF、PNG 和 SWF 文件)只有在完全下载之后才能显示。
  • width:所插入的图像、SWF 文件或影片剪辑的宽度(以像素为单位)。
  • height:所插入的图像、SWF 文件或影片剪辑的高度(以像素为单位)。
  • align:指定文本字段中嵌入图像的水平对齐方式。 有效值为 leftright。 默认值为 left
  • hspace:指定图像周围不显示任何文本的水平空间量。 默认值为 8。
  • vspace:指定图像周围不显示任何文本的垂直空间量。 默认值为 8。
  • id:指定包含嵌入的图像文件、SWF 文件或影片剪辑的影片剪辑实例(由 Flash Player 创建)的名称。 该属性可用于控制使用 ActionScript 嵌入的内容。
  • checkPolicyFile:指定 Flash Player 将检查服务器上与图像的域相关的跨域策略文件。 如果跨域策略文件存在,则此文件中列出的域中的 SWF 文件可以访问加载图像的数据,例如通过调用以此图像作为 source 参数的 BitmapData.draw() 方法。 有关详细信息,请参阅《ActionScript 3.0 编程》中的“Flash Player 安全性”一章。

Flash 以完全大小显示文本字段中嵌入的媒体。 若要指定嵌入的媒体的尺寸,请使用 <img> 标签的 heightwidth 属性。

通常情况下,文本字段中嵌入的图像显示在 <img> 标签后的行上。 但是,如果 <img> 标签是文本字段中的第一个字符,则该图像显示在文本字段的第一行上。

斜体标签 <i> 标签以斜体形式显示标签中的文本。 斜体必须可用于所使用的字体。
列表项标签 <li> 标签在所包含的文本前放置项目符号。 注意:因为 Flash Player 无法识别有序和无序列表标签(<ol><ul>),所以这些标签无法修改列表的呈现方式。 所有列表都是无序的,所有列表项都使用项目符号。
段落标签 <p> 标签创建一个新段落。 若要使用此标签,您必须将文本字段设置为多行文本字段。 <p> 标签支持以下属性:

  • align:指定段落内文本的对齐方式;有效值为 leftrightjustifycenter
  • class:指定 flash.text.StyleSheet 对象定义的 CSS 样式类。
Span 标签 <span> 标签只可用于 CSS 文本样式。 它支持以下属性:

  • class:指定 flash.text.StyleSheet 对象定义的 CSS 样式类。
文本格式标签 使用 <textformat> 标签可在文本字段中使用 TextFormat 类的段落格式设置属性的子集,其中包括行距、缩进、边距和 Tab 停靠位。 您可以将 <textformat> 标签与内置 HTML 标签结合使用。

<textformat> 标签具有以下属性:

  • blockindent:指定块缩进(以磅为单位);对应于 TextFormat.blockIndent
  • indent:指定从左边距到段落中第一个字符的缩进;对应于 TextFormat.indent。 正数和负数均可以接受。
  • leading:指定行与行之间的前导量(垂直间距);对应于 TextFormat.leading。 正数和负数均可以接受。
  • leftmargin:指定段落的左边距(以磅为单位);对应于 TextFormat.leftMargin
  • rightmargin:指定段落的右边距(以磅为单位);对应于 TextFormat.rightMargin
  • tabstops:将自定义 Tab 停靠位指定为一个非负整数的数组;对应于 TextFormat.tabStops
下划线标签 <u> 标签为标签文本添加下划线。

Flash Player 支持以下 HTML 实体:

实体 Description
&lt; < (小于)
&gt; > (大于)
&amp; &(和)
&quot; “(双引号)
&apos; ‘(撇号,单引号)

Flash 还支持显式字符代码,如 &#38;(ASCII 和号)和 &#x20AC;(Unicode € 符号)。

Flash Actionscript 3.0 位图九宫格切片代码

来源:http://bbs.9ria.com/thread-235526-1-1.html

package cn.flashk.controls.support{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.geom.Matrix;
	import flash.geom.Point;
	import flash.geom.Rectangle;

	/**
	* <p>Scale9GridBitmap 用来创建位图的九宫格缩放。(因为flash本身的九宫格缩放并不支持位图,只支持矢量)</p>
	* 
	* 要使用位图的九宫格,请先传递原始的图像到sourceBitmapData属性,scale9GridBitmap.sourceBitmapData = bitmapData实例
	* 然后直接设置width和height属性。(此时scaleX和scaleY始终为1,set width和set height函数已经被重写)。
	* 虽然你仍然可以设置scale横向缩放和竖向缩放,不过不建议使用设置scaleX和scaleY属性缩放。要使用scaleX而又要开启九宫格,请使用 b.width = b.width 乘以 b.scaleX这样的语法。
	*/

	public class Scale9GridBitmap extends Bitmap {
		/**
		* 九宫格左边竖线与0坐标的距离
		*/
		public var leftLineSpace:uint = 8;
		/**
		* 九宫格右边竖线与图像最右像素的距离
		*/
		public var rightLineSpace:uint = 8;
		/**
		* 九宫格上面横线与0坐标的距离
		*/
		public var topLineSpace:uint = 6;
		/**
		* 九宫格下面横线与图像最下像素的距离
		*/
		public var bottomLineSpace:uint = 6;
		/**
		* 控制再拉伸九宫格位图时是否对中间的部分开启平滑处理,默认关闭,开启将获得更好的渐变效果,设置为 true 的情况下绘制位图要比在设置为 false 的情况下执行相同操作更为缓慢,请注意此参数与smoothing属性的区别,smoothing是指控制在整个位图缩放时是否进行平滑处理。
		* smoothing在这里只影响小数坐标时是否平滑处理,因为Scale9GridBitmap的在重设宽高时scaleX和scaleY始终为1(set width和set height函数已经被重写,但你仍然可以自己设置scaleX,此时smoothing会有效果)
		* 
		* <p>修改scaleSmoothing只会在下一次更改宽高时生效,并不会立即刷新图像,如果需要立即刷新,请调用update函数</p>
		* 
		* @see #update()
		*/
		public var scaleSmoothing:Boolean = false;

		protected var sourceBD:BitmapData;
		protected var _width:uint=0;
		protected var _height:uint=0;
		protected var bd:BitmapData;

		public function Scale9GridBitmap() {
		}

		/**
		* 设置Scale9GridBitmap的原始未缩放的源数据,可以与其他 Bitmap 共用一个 Bitmapdata。因为Scale9GridBitmap在重设宽高需要重新计算bitmapdata数据,需要以此属性的数据做参考,Scale9GridBitmap并不会修改此属性中的像素数据。只会修改自身bitmapdata属性的数据。
		*/
		public function set sourceBitmapData(value:BitmapData):void {
			sourceBD = value;
			this.bitmapData = sourceBD;
			if (_height==0) {
				_height = sourceBD.height;
			}
			if (_width == 0) {
				_width = sourceBD.width;
			}
		}

		public function useSourceSize():void {
			this.bitmapData = sourceBD;
			_height = sourceBD.height;
			_width = sourceBD.width;
		}

		/**
		* 更改Scale9GridBitmap的宽度,修改此值将重新计算Scale9GridBitmap的bitmapData数据,如果height值与源图像相同,只修改width将采用3分法加速
		* 
		* @see #scaleGrid3()
		* @see #update()
		*/
		override public function set width(value:Number):void {
			if (uint(value) == _width) {
				return;
			}
			_width = uint(value);
			if (sourceBD == null) {
				return;
			}
			if (_width == sourceBD.width && _height == sourceBD.height) {
				this.bitmapData = sourceBD;
				return;
			}
			if (_height == sourceBD.height) {
				scaleGrid3();
			} else {
				scaleGrid9();
			}
		}

		/**
		* 更改Scale9GridBitmap的高度,修改此值将重新计算Scale9GridBitmap的bitmapData数据,如果width值与源图像相同,只修改height将采用3分法加速
		* 
		* @see #scaleGrid3V()
		* @see #update()
		*/
		override public function set height(value:Number):void {
			if (uint(value) == _height) {
				return;
			}
			_height = uint(value);
			if (_width == sourceBD.width && _height == sourceBD.height) {
				this.bitmapData = sourceBD;
				return;
			}
			if (_width == sourceBD.width) {
				scaleGrid3V();
			} else {
				scaleGrid9();
			}
		}

		/**
		* 立即重新计算图像,如果sourceBitmapData的数据有更新,调用此方法立即刷新Scale9GridBitmap与sourceBitmapData同步,请注意Scale9GridBitmap的bitmapData始终与sourceBitmapData是两份不同的数据和对象
		*/
		public function update():void {
			if (sourceBD && _width == sourceBD.width && _height == sourceBD.height) {
				this.bitmapData = sourceBD;
				return;
			}
			if (sourceBD && _width == sourceBD.width) {
				scaleGrid3V();
			} else if (sourceBD && _height == sourceBD.height) {
				scaleGrid3();
			} else {
				scaleGrid9();
			}
		}

		/**
		* 横向3分格启用加速
		*/
		protected function scaleGrid3():void {
			if (bd != null) {
				bd.dispose();
			}
			bd = new BitmapData(_width,_height,true,0);
			bd.copyPixels( sourceBD,new Rectangle(0,0,leftLineSpace,_height),new Point(0,0) );
			var tmpBD:BitmapData;
			tmpBD = new BitmapData(sourceBD.width-leftLineSpace-rightLineSpace,sourceBD.height,true,0);
			tmpBD.copyPixels(sourceBD,new Rectangle(leftLineSpace,0,tmpBD.width,tmpBD.height),new Point(0,0) );
			var mat:Matrix = new Matrix();
			var sca:Number = (_width-leftLineSpace-rightLineSpace)/(sourceBD.width-leftLineSpace-rightLineSpace);
			mat.scale(sca,1);
			mat.tx = leftLineSpace;
			bd.draw(tmpBD,mat,null,null,new Rectangle(leftLineSpace,0,_width-leftLineSpace-rightLineSpace,_height),scaleSmoothing );
			bd.copyPixels( sourceBD,new Rectangle(sourceBD.width-rightLineSpace,0,rightLineSpace,_height),new Point(_width-rightLineSpace,0) );
			this.bitmapData = bd;
			tmpBD.dispose();
		}

		/**
		* 竖向3分格启用加速
		*/
		protected function scaleGrid3V():void {
			if (bd != null) {
				bd.dispose();
			}
			bd = new BitmapData(_width,_height,true,0);
			bd.copyPixels( sourceBD,new Rectangle(0,0,_width,_height),new Point(0,0) );
			var tmpBD:BitmapData;
			tmpBD = new BitmapData(sourceBD.width,sourceBD.height-topLineSpace-bottomLineSpace,true,0);
			tmpBD.copyPixels(sourceBD,new Rectangle(0,topLineSpace,tmpBD.width,tmpBD.height),new Point(0,0) );
			var mat:Matrix = new Matrix();
			var sca:Number = (_height-topLineSpace-bottomLineSpace)/(sourceBD.height-topLineSpace-bottomLineSpace);
			mat.scale(1,sca);
			mat.ty = topLineSpace;
			bd.draw(tmpBD,mat,null,null,new Rectangle(0,topLineSpace,_width,_height-topLineSpace-bottomLineSpace),scaleSmoothing );
			bd.copyPixels( sourceBD,new Rectangle(0,sourceBD.height-bottomLineSpace,_width,bottomLineSpace),new Point(0,_height-bottomLineSpace) );
			this.bitmapData = bd;
			tmpBD.dispose();
		}

		protected function scaleGrid9():void {
			if (bd != null) {
				bd.dispose();
			}
			var tmpBD:BitmapData;
			bd = new BitmapData(_width,_height,true,0);
			var scaX:Number=(_width-leftLineSpace-rightLineSpace)/(sourceBD.width-leftLineSpace-rightLineSpace);
			var scaY:Number = (_height-topLineSpace-bottomLineSpace)/(sourceBD.height-topLineSpace-bottomLineSpace);
			var mat:Matrix;
			tmpBD = new BitmapData(sourceBD.width-leftLineSpace-rightLineSpace,topLineSpace,true,0);
			tmpBD.copyPixels(sourceBD,new Rectangle(leftLineSpace,0,tmpBD.width,tmpBD.height),new Point(0,0) );
			mat= new Matrix();
			mat.scale(scaX,1);
			mat.tx = leftLineSpace;
			bd.draw(tmpBD,mat,null,null,new Rectangle(leftLineSpace,0,_width-leftLineSpace-rightLineSpace,topLineSpace),scaleSmoothing );
			if (bottomLineSpace == topLineSpace) {
				tmpBD.fillRect(new Rectangle(0,0,tmpBD.width,tmpBD.height),0);
			} else {
				tmpBD.dispose();
				tmpBD = new BitmapData(sourceBD.width-leftLineSpace-rightLineSpace,bottomLineSpace,true,0);
			}
			tmpBD.copyPixels(sourceBD,new Rectangle(leftLineSpace,sourceBD.height-bottomLineSpace,tmpBD.width,tmpBD.height),new Point(0,0) );
			mat.ty = _height-bottomLineSpace;
			bd.draw(tmpBD,mat,null,null,new Rectangle(leftLineSpace,_height-bottomLineSpace,_width-leftLineSpace-rightLineSpace,bottomLineSpace),scaleSmoothing );
			mat= new Matrix();
			mat.scale(1,scaY);
			tmpBD.dispose();
			tmpBD = new BitmapData(leftLineSpace,sourceBD.height-topLineSpace-bottomLineSpace,true,0);
			tmpBD.copyPixels(sourceBD,new Rectangle(0,topLineSpace,tmpBD.width,tmpBD.height),new Point(0,0) );
			mat.ty = topLineSpace;
			bd.draw(tmpBD,mat,null,null,new Rectangle(0,topLineSpace,leftLineSpace,_height-topLineSpace-bottomLineSpace),scaleSmoothing );
			if (rightLineSpace == leftLineSpace) {
				tmpBD.fillRect(new Rectangle(0,0,tmpBD.width,tmpBD.height),0);
			} else {
				tmpBD.dispose();
				tmpBD = new BitmapData(rightLineSpace,sourceBD.height-topLineSpace-bottomLineSpace,true,0);
			}
			tmpBD.copyPixels(sourceBD,new Rectangle(sourceBD.width-rightLineSpace,topLineSpace,tmpBD.width,tmpBD.height),new Point(0,0) );
			mat.tx = _width-rightLineSpace;
			bd.draw(tmpBD,mat,null,null,new Rectangle(_width-rightLineSpace,topLineSpace,rightLineSpace,_height-topLineSpace-bottomLineSpace),scaleSmoothing );
			mat = new Matrix();
			mat.scale(scaX,scaY);
			tmpBD.dispose();
			tmpBD = new BitmapData(sourceBD.width-leftLineSpace-rightLineSpace,sourceBD.height-topLineSpace-bottomLineSpace,true,0);
			tmpBD.copyPixels(sourceBD,new Rectangle(leftLineSpace,topLineSpace,tmpBD.width,tmpBD.height),new Point(0,0) );
			mat.tx = leftLineSpace;
			mat.ty = topLineSpace;
			bd.draw(tmpBD,mat,null,null,new Rectangle(leftLineSpace,topLineSpace,_width-leftLineSpace-rightLineSpace,_height-topLineSpace-bottomLineSpace),scaleSmoothing );
			tmpBD.dispose();
			bd.copyPixels(sourceBD,new Rectangle(0,0,leftLineSpace,topLineSpace),new Point(0,0) );
			bd.copyPixels(sourceBD,new Rectangle(0,sourceBD.height-bottomLineSpace,leftLineSpace,bottomLineSpace),new Point(0,_height-bottomLineSpace) );
			bd.copyPixels(sourceBD,new Rectangle(sourceBD.width-rightLineSpace,0,rightLineSpace,topLineSpace),new Point(_width-rightLineSpace,0) );
			bd.copyPixels(sourceBD,new Rectangle(sourceBD.width-rightLineSpace,sourceBD.height-bottomLineSpace,rightLineSpace,bottomLineSpace),new Point(_width-rightLineSpace,_height-bottomLineSpace) );
			this.bitmapData = bd;
		}

	}
}

 

【解决方案】iebook黑屏怎么办? Zmaker 出错怎么办?

【 解决方案 】iebook黑屏怎么办
【 解决方案 】iebook黑屏怎么办

近期有不少网友出现打开iebook程序出现黑屏或打开Zmaker出错的问题。追根溯源,都是Adobe惹的祸——最新版的Adobe Flash Player 18版本存在Bug导致(截止18.0.0.160无此问题) 。现给出解决方案——卸载18版本,安装17旧版或更新的19版

继续阅读【解决方案】iebook黑屏怎么办? Zmaker 出错怎么办?

【iebook 超级精灵系列教程 2】制作片头

最近在群里看到有些人问如何让自己制作的flash片头在iebook里居中显示。印象中官方提供的帮助文档有说明的。

经过试验,个人觉得官方的制作介绍有些不清楚、不完善的地方,所以就自己写一篇供大家参考。如果有什么疏漏,请不吝赐教。: )

继续阅读【iebook 超级精灵系列教程 2】制作片头

iebook Actionscript2.0 脚本

注:在插入的内页flash中,要想调用以下参数(或函数)或者自制按钮的自定义函数,请在舞台第一帧添加this._lockroot=false语句。——感谢zmaker的指导

转到封面 _root.Zine1.gotoCover()
转到目录 _root.Zine1.gotoContent()
转到封底 _root.Zine1.gotoBCover()
转到某页 _root.Zine1.gotopage(int(pageNumber)+1) (注:pageNumber 从0开始)
设置音量 _root.Zine1.setmusicvol(v) (注:取值范围0~100)
获取音量 _root.Zine1.getmusicvol()
转到上一页 _root.Zine1.prevpage()
转到下一页 _root.Zine1.nextpage()
当前页 _root.Zine1.getpage()
当前帧 _root.Zine1.getframeplayed()
总页数 _root.Zine1.getmaxpage()
全屏/1:1显示 _root.Zine1.screenfull()
最小化 _root.Zine1.minimize()
退出 _root.Zine1.exit();
单页宽度 _root.Zine1.getpageW();
单页高度 _root.Zine1.getpageH();
屏幕宽度 System.capabilities.screenResolutionX;
屏幕高度 System.capabilities.screenResolutionY;
隐藏底部版权 _root.Zine1.copy_mc.Copyright._visible=false

========================

iebook内页专用
获取深度  this._parent.getDepth();
获取角度  this._parent._rotation;
获取比例  this._xscale;

=====================

复制地址 _root.Zine1.AppCommand(“CopyUrl”, “”)

加载 ie搜索按钮 _root.Zine1.loadTool(“iesearch”, “iesearch.swf”)

加载在线交流按钮 _root.Zine1.loadTool(“comment”, “comment.swf”)

加载即时通信功能

var Info = _root.Zine1.getZineInfo();
if (Info.IM.toLowerCase() == "qq") {
    getURL (("tencent://message/?uin=" + Info.QQ) + "&Site=iebook.cn&Menu=yes");
} else {
    getURL ("msnim:chat?contact=" + Info.MSN);
}

加载涂鸦按钮 _root.Zine1.loadTool(“booktag”, “booktag.swf”)

加载打印按钮 _root.Zine1.loadTool(“print”, “print.swf”)

加载帮助按钮 _root.Zine1.loadTool(“help”, “help.swf”)

加载设置按钮 _root.Zine1.loadTool(“config”, “config.swf”)

加载统计系统 _root.Zine1.loadTool(“count”, “count.swf”)

其他按钮

Question.swf 文件调查

recommend.swf

=====================

获取名称变量(赋值:caption)

 _root.Zine1.getCaption()
if (caption.type.toLowerCase() == "string") {
    this.caption_txt.autoSize = "left";
    this.caption_txt.text = caption.value;
    bg._width = caption_txt._width + 10;
    bg._height = caption_txt._height;
} else {
    bg._visible = false;
    caption_txt._visible = false;
    this.createEmptyMovieClip("logo", 0);
    eobj.onLoadInit = function (t) {
        t._y = 18 - t._height;
    };
    mc_l.addListener(eobj);
    mc_l.loadClip(caption.value, this.logo);
}

打开名称链接 getURL (caption.link, “_blank”);

获取版权信息 _root.Zine1.getCopyright()

获取版权链接 _root.Zine1.getCopyLink()

====================

on(rollOver){
    _root.showalt("提示内容"); //显示提示信息
}

on(releaseOutside,rollOut){
    _root.hidealt();//隐藏提示信息
}

====================

内容定位

function reposmc(mc, bottom, right) {
    mc._x = mc._x + (right * (mag_w - 375));
    mc._y = mc._y + (bottom * ((mag_h - 550) / 2));
}

var comm1 = this.attachMovie("communicate", "comm1", -1);
stop();
br.prve_b._visible = false; //上一页按钮不可见
var eobj = new Object();
eobj.Magflipover = function (target) {
    br.prve_b._visible = true; //上一页按钮可见
    br.next_b._visible = true; //下一页按钮可见
    if (_root.Zine1.getpage() == _root.Zine1.getmaxpage()) {
        br.next_b._visible = false;
    }
    if (_root.Zine1.getpage() == 0) {
        br.prve_b._visible = false;
    }
};

_root.Zine1.addEventListener("Magflipover", eobj);
if (_root.Zine1.getshowplaystate() == false) {
    bl.playstate.unloadMovie();
}
var mag_w = _root.Zine1.getpageW();
var mag_h = _root.Zine1.getpageH();
reposmc(br, 2, 2);
reposmc(bl, 2, 0);
reposmc(tr, 0, 2);
reposmc(iebookbq, 2, 0.5);
reposmc(cpt, 2, 0.5);
reposmc(hidenbt, 0, 2);

===============================================

zine1 有以下成员

ws: _level0.Zine1.ws
initmc: _level0.Zine1.initmc
bg: _level0.Zine1.bg
fullscreen: true
maxp: 4
bgimgurl:
sendreport: false
TemplateMode: true
screenH: 768
screenW: 1024
pageH: 650
pageW: 475
ShowInit: false
Shadowdepth: 26
ShadowFilter: 7
pagefengdis: false
showplaystate: false
AutoSpeedSetting: 6000
AutoEnabledSetting: false
BscreenH: 768
BscreenW: 1366
bs: [object Object]
toolscon2: _level0.Zine1.toolscon2
toolscon: _level0.Zine1.toolscon
toolbar1: _level0.Zine1.toolbar1 // 按钮
dface: [object Object]
mag: _level0.Zine1.mag
eObject: [object Object]
BaseURL:
toolsloader: [object Object]
dispatchQueue: [type Function]
dispatchEvent: [type Function]
removeEventListener: [type Function]
addEventListener: [type Function]
toolbar1: _level0.Zine1.toolbar1
initmc: _level0.Zine1.initmc
ws: _level0.Zine1.ws
timer: _level0.Zine1.timer
toolscon2: _level0.Zine1.toolscon2
toolscon: _level0.Zine1.toolscon
mag: _level0.Zine1.mag
copy_mc: _level0.Zine1.copy_mc // 版权
bg: _level0.Zine1.bg

===============================================

2013年11月16日

代码来源经典视频收藏版4

_root.online 电子杂志是否为在线版本

_root.getFLVPath(path) 获取FLV视频路径(此函数可能程序自带,或自定义函数);如:_root.getFLVPath(“1.flv”)

function getFLVPath(path){
    return ("http://"+ path);
}

video 为FLVPlayback组件

video 的事件

onClipEvent (construct){
    autoPlay = true;
    autoRewind = true;
    autoSize = false;
    bufferTime = 1.000000E-001;
    contentPath = "";
    isLive = false;
    maintainAspectRatio = true;
    skin = "";
    skinAutoHide = false;
    totalTime = 0;
    volume = 100;
}
video.bufferingBar = my_bufferingBar; //my_bufferingBar为用户定义的元件名
video.pauseButton = my_pauseButton; //同上
video.contentPath = _root.getFLVPath(_parent._parent.attachfile4); //参阅楼上
listenerObject = new Object();
listenerObject.ready = function (eventObject){
    playpauseButton.gotoAndStop(2);
    if (video.width < 485){
        video._x = (485 - video.width) / 2 + 0;
    }
    if (video.height < 270){
        video._y = (270 - video.height) / 2 + 30;
    }
};
listenerObject.complete = function (eventObject){
    playpauseButton.gotoAndStop(1);
};
video.addEventListener("ready", listenerObject);
video.addEventListener("complete", listenerObject);



/*----------------华丽的分割线------------------*/
listenerObject = new Object();
listenerObject.ready = function (eventObject){
    ctr.playpauseButton.gotoAndStop(2); //ctr为影片剪辑,内含播放、暂停按钮
    video.maintainAspectRatio = false;
    video.width = 485;
    video.height = 270;
};
listenerObject.complete = function (eventObject){
    ctr.playpauseButton.gotoAndStop(1);
};
video.addEventListener("ready", listenerObject);
video.addEventListener("complete", listenerObject);

 

 

Flash Actionscript 3.0 学习笔记

一、如何加载外部文件。

1、当网页中嵌入swf文件后,swf内的路径是相对于网页的。需要修改object 和 embed 标签的 base 属性,来指定swf加载的路径的父路径。加载外部文件时,子目录写法“sound/music.mp3”。注意斜杠方向

2、(以下ABC都指swf文件) 如果A加载了B,B又加载了C。直接在 Flash IDE 中测试时,会出现 Error #2035 错误。当时在网页中却没问题(前提是设置了 base 属性)

3、外部文件名为中文时,请加 encodeURI(),在服务器上测试通过,直接打开网页测试通不过。

二、如何让 flash 在浏览器窗口中全屏

1、文件》发布设置》其他格式(HTML包装器)

2、基本设置如下:

  大小:百分比

  缩放:精确匹配

三、(参考《殿堂之路 4.4.4函数动态添加实例属性》)访问上级的其他同级对象(如影片剪辑对象.name=”otherObjName”,或者在“实例名称”一栏中写上otherObjName)写法:this.parent[“otherObjName”]

  (1)不要写成 this.parent.otherObjName或者 this.parent.getChildByName(“otherObjName”)

  (2)以下脚本会出错:

this.parent.otherObjName.addChild(DisplayObject)???

//元件’****’, 图层’***, 帧 **,*** 行?1119: 访问可能未定义的属性?(通过 static 类型 flash.display:DisplayObjectContainer 引用)。

this.parent.getChildByName(“otherObjName”).addChild(DisplayObject)???

//元件’***’, 图层’***’, 帧 **,** 行?1061: 调用可能未定义的方法 addChild (通过 static 类型 flash.display:DisplayObject 引用)。

以下脚本正确:this.parent[otherObjName].addChild(DisplayObject)

类推:this.parent.gotoAndPlay(2) 会出错(出错代码1061),改成 this[“parent”].gotoAndPlay(2) 就没问题了

3、在进行和asp,数据库等有关的连接时,单击【控制】>【清除发布缓存并测试影片】,并不能有效的清除缓存。需要使用IE浏览器的清除功能清理下,再单击【控制】。。。才行。

个人经验之谈,或许和当时一直开始浏览器有关吧~~

4、http://help.adobe.com/zh_CN/flash/cs/using/WSb03e830bd6f770ee-70a39d612436d472f4-7ff8.html
使用相对于 SWF 文件的路径来指示 FLV 或 F4V 文件的位置

使用相对于网页的路径来指示皮肤文件的位置

这可让您在本地使用与服务器上相同的目录结构。如果视频此前已部署到承载视频的 FMS 或 FVSS 上,则可以跳过这一步。