900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > Flash MX ActionScript字典

Flash MX ActionScript字典

时间:2023-09-29 10:06:19

相关推荐

Flash MX ActionScript字典

scroll

selection(对象)

这个类提供了一些用于控制当前处于聚焦状态的文本编辑框的方法。该类没有构造函数,它只能用来操纵当前处于选中状态的文本编辑框。

方法

Selection.addListener

Selection.getBeginIndex

Selection.getCaretIndex

Selection.getEndIndex

Selection.getFocus

Selection.onSetFocus

Selection.removeListener

Selection.setFocus

Selection.setSelection

set

SetInterval

setProperty

Sound(对象)

Sound类提供了控制声音的一些属性和方法。Sound类有自己的构造函数,因此可以定义实例。Sound类只在Flash 5中得到支持。

方法

声音对象属性概要

声音对象的事件处理

构造函数

Sound.attachSound

Sound.duration

Sound.getBytesLoaded

Sound.getBytesTotal

Sound.getPan

Sound.getTransform

Sound.getVolume

Sound.LoadSound

Sound.onLoad

Sound.onSoundComplete

Sound.position

Sound.setPan

Sound.setTransform

Sound.setVolume

Sound.start

Sound.stop

_soundbuftime

Stage(对象)

Stage类是顶级对象,不用构造器就可以直接访问。使用这个对象的方法和属性,可以访问和处理Flash影片的边界信息。只有Flash6或更新的版本才有Stage类。

方法

属性

事件句柄

Stage.addListener

Stage.align

播放器

Flash 6

示例

参看

Stage.height

Stage.onResize

Stage.removeListener

Stage.scaleMode

Stage.width

startDrag

stop

stopAllSounds

stopDrag

String(含数)

String(对象)

String类封装了一些字符串操作的方法和属性,使用String()函数可以将其他任何数据类型转换成String类的实例。调用String类的方法前需要调用构造函数初始化其实例;但也可以直接使用字符串常量调用String类的方法,此时会自动将这个字符串常量转换成一个临时的字符串对象然后再调用其方法。 请注意一个字符串对象和一个字符串常量的区别,一个是对象,另一个是一个简单数据类型,如下s1是字符串,s2是字符串对象: s1 = "hello"; s2 = new String( "hello" ); x1 = s1.length; x2 = s2.length; 上面脚本中,x1和x2的结果都是5。 在没必要定义字符串对象的时候推荐直接使用字符串常量,因为使用字符串对象通常会出现一些异常的行为。方法属性构造函数

String.charAt

String.charCodeAt

String.concat

String.fromCharCode

String.indexOf

String.lastIndexOf

String.length

String.slice

String.split

String.substr

String.substring

String.toLowerCase

String.toUpperCase

substring

super

switch

System(对象)

包含容器对象的最高层类。只有通过使用系统对象才能使用容器对象和它的属性。例如,下面的代码查看系统是否具有声卡功能:

System.capabilites.hasAudio

System.capabilities(对象)

使用System.capabilites对象,可以测定系统和播放器播放Flash影片的性能。这个对象允许为不同的格式设定不同的内容。例如,移动电话的显示屏(黑白,100平方像素)与1000平方像素的彩色PC显示器迥然不同。为了尽可能为更多的用户提供合适的内容,必须是同Capabilities对象确定用户的硬件设备。基于设备的性能,可以制定服务器发送不同的SWF文件或改变Flash影片的播放内容。使用GET或POST HTTP方法,可以发送性能信息。下例是一个设备的服务器字符串,该设备没有MP3支持,有400x200像素,8 x 4厘米的显示器:

Capabilities对象只有Flash 6及以后版本支持。只有通过System.capabilities对象才能访问Capabilities的所有属性。

属性概要

System.capabilities.hasAudioEncoder

System.capabilities.hasAccessibility

System.capabilities.hasAudio

System.capabilities.hasMP3

System.capabilities.language

Flash支持以上的语言。

播放器

Flash 6

System.capabilities.manufacturer

System.capabilities.os

System.capabilities.pixelAspectRatio

System.capabilities.screenColor

System.capabilities.screenDPI

System.capabilities.screenResolutionX

System.capabilities.screenResolutionY

System.capabilities.version

System.capabilities.hasVideoEncoder

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。