|
Current and Item在整个FlexScript中经常使用以下表达式:
# [8 w& M* |& ^ ^+ p•current - 当前变量是对当前资源对象的引用。 它通常是选择列表中的访问变量。6 u# y$ ]& p" G4 |
•item - 该项变量是对触发器或函数的相关项的引用。 它通常是选择列表中的访问变量。8 I2 g+ \1 e. b6 Q o
7 H# g# i7 o( h# b' {+ g1 {" i$ BReferencing Objects
: m1 k) _2 B& f9 w* X* L4 c Command | | | | This returns a reference to the first ranked object/node inside of node 对当前节点第一个子节点的引用 | | | This returns a reference to last ranked object/node inside of node 对当前节点最后一个子节点的引用 | | | This returns a reference to the object at a given rank inside of node 对当前节点的子节点按照排列级别引用 | | object.inObjects[portnum] | This returns a reference to the object connected to the input port number of object 当前对象输入节点的引用 | | >object.outObjects[portnum] | This returns a reference to the object connected to the output port number of object 当前对象输出节点的引用 | | object.centerObjects[portnum] | This returns a reference to the object connected to the center port number of object 当前对象中间节点的引用 | | | This returns a reference to the next ranked object of node 返回当前节点的下一个临近节点(基于节点树) | | | This returns a reference to the previous ranked object of node 返回当前节点的上一个临近节点(基于节点树) | | | This returns the object found at path in the tree beginning from node 返回基于路径寻找到的对象 | | , r+ A! P! A) r. ]; f* ?) c
2 O1 Y) D; m7 h2 c4 [/ W0 mObject Attributes
! k2 x/ I7 k3 ~1 f Command | | | This returns the name of the object 返回当前对象的名称 | | This sets the name of the object to newName 设定当前堆场的名称为newName | object.color = Color.color | This sets the color of the object (where color is red, green, blue, random(), etc.) 设定当前对象的颜色 | object.color = Color(red, green, blue) | This sets the color of the object to an rgb color 设定当前对象的颜色(基于RGB编码) | setobjectshapeindex(object, indexnum) | This sets the 3D shape of the object 设定当前对象的三维形状 | setobjecttextureindex(object, indexnum) | This sets the 3D texture of the object 设定当前对象的三维特征 | Object Spatial Attributes0 o/ R/ R- C9 {9 m0 I6 y# ]
Command | | object.location.x; v3 x/ p. S: Z' f3 X! Y+ Z$ r
object.location.y+ {& d8 Z8 y i- F/ \+ X+ l) s* _
object.location.z | Gets the x, y, and z locations of the object respectively 分别获取对象的x,y和z位置 | object.setLocation(xnum, ynum, znum) | This sets the x, y, and z location of the object 设定对象的x,y和z位置 | object.size.x6 |9 k: d: p' B: |9 D* `3 F
object.size.y
* i. N! w0 P3 e% j object.size.z | Gets the x, y, and z size of the object respectively 分别获取对象的x,y和z尺寸 | object.setSize(xnum, ynum, znum) | This sets the x, y, and z size of the object 设定对象的x,y和z尺寸 | object.rotation.x
3 O$ j) A* D1 ?, g object.rotation.y
0 l( o: z1 D) m0 h1 M5 }9 b object.rotation.z | Gets the x, y, and z rotation of the object respectively 分别获取对象的x,y和z旋转角度 | object.setRotation(xdeg, ydeg, zdeg) | This sets the x, y, and z rotation of the object 设定对象的x,y和z旋转角度 |
( ~& Y$ @2 o% h0 l7 ~& F- o( \! J' P8 i' W5 I2 r( @
Object Statistics
9 u* g2 a* q! P+ o$ @5 L4 y Command(parameter list) | | | This returns the current content of the object 返回对象子节点长度 | | This returns the input statistic of the object 返回对象的输入状态 | | This returns the output statistic of the object 返回对象的输出状态 | obj.stats.state().value = statenum | This sets the current state of the object 设定对象的当前状态 | | This returns the current state value of the object 返回对象的当前状态 | obj.stats.state().valueString | This returns the current state of the object as a string 以字符串的形式返回当前对象的状态 | | This returns the rank of the object 返回对象在节点树中的层级序列 | | This sets the rank of the object 设定对象在节点树中的层级序列 | | This returns the time the flow item entered the object it is currently in 返回临时实体进入当前对象的时间 | | This returns the time the flow item was created 返回临时实体被创建的时间 | & C3 k( A4 V" o, S o; u! c
, X. u* c1 A$ j! |1 _/ S
Object Labels
: l' r# E; g4 F7 m$ k: H; ~3 R Command(parameter list) | | object.labelName
+ J; p! b5 T( y1 Y0 K7 T# Y object.labels[labelRank].value | This returns the value of the object's label. 返回对象的标签值 | object.labelName = value
3 x' R! d1 Z8 Y- P% o: c; d: l$ c object.labels[labelRank].value = value | This sets the value of the object's label. 设定对象的标签值 | object.labels["labelname"]# J6 K$ P7 M7 u% ]( O1 T& N
object.labels[labelRank] | This returns a reference to the label as a node. Often used if you have a label that is used as a table. 返回一个对标签的节点引用。经常用于将标签最为报表使用时。 |
( A- o) d. ~- v8 j7 M0 J- ?. Q p E% n
Object Variables/ [( `4 X1 _$ y( q( r S# M
command(parameter list) | | getvarnum(object, "variablename") | This returns the number value of the variable with the given name 返回给定变量的数值 | setvarnum(object, "variablename", value) | This sets the number value of the variable with the given name 设定给定变量的数值 | getvarstr(object, "variablename") | This returns the string value of the variable with the given name 返回给定变量的字符值 | setvarstr(object, "variablename", string) | This sets the string value of the variable with the given name 设定给定变量的字符值 | getvarnode(object, "variablename") | This returns a reference to the variable with the given name as a node 将返回的对象变量作为一个节点引用 | . i' o3 F. b, j! G& ~
0 U6 N9 P0 l7 @* u6 {3 A2 J
4 m. L% s! q! p8 y9 D: z; y5 ~# y9 [; r- k0 _: f
|
评分
-
查看全部评分
|