|
Current and Item在整个FlexScript中经常使用以下表达式:4 w# R9 t+ Y1 V# I6 p- E# u( p+ y
•current - 当前变量是对当前资源对象的引用。 它通常是选择列表中的访问变量。
7 b2 K4 u0 p N* a•item - 该项变量是对触发器或函数的相关项的引用。 它通常是选择列表中的访问变量。8 Z0 |8 [& K! R# x- Y/ i
$ ?/ s2 v7 P9 l
Referencing Objects
4 d0 [: a! J( g* X0 J y 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 返回基于路径寻找到的对象 | | # t: K+ }" ^9 H5 D6 p1 u
; l- s8 C, a6 ?Object Attributes* K: ^/ D( ?9 W. @5 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 Attributes
* d! a1 B9 g9 |* |4 `# u Command | | object.location.x% s' y+ A- p- U1 n
object.location.y8 p+ M; D" Q8 y& U3 G8 X( }. X
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.x4 U+ R L/ r) A# U* W
object.size.y
. a0 I2 p$ g. R1 e" z7 T5 s 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: W1 K6 w. }: W+ o7 c$ M5 o
object.rotation.y6 n8 d3 W! ]: [4 O1 ?
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旋转角度 |
6 H8 g8 {7 Y( U4 p* Q: _: T# }0 S: b) b, V
Object Statistics1 [3 Y5 E0 y \ z! g5 d* j! @
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 返回临时实体被创建的时间 |
6 {; a9 d2 d/ o! a; i6 G7 H, v& F" n) x4 C$ Z. x8 c2 c* N0 K
Object Labels
& J0 W: Q9 o* d& ? Command(parameter list) | | object.labelName/ m! u" a' t J T! C# J
object.labels[labelRank].value | This returns the value of the object's label. 返回对象的标签值 | object.labelName = value
9 t2 n! y5 g" C+ I4 j* q object.labels[labelRank].value = value | This sets the value of the object's label. 设定对象的标签值 | object.labels["labelname"]
3 Y; b+ l' D3 Y+ ^! | 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. 返回一个对标签的节点引用。经常用于将标签最为报表使用时。 | 6 k1 ~& u) ^5 l2 K
6 S5 o# U7 k9 q" EObject Variables- ]" I9 l- s/ O
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 将返回的对象变量作为一个节点引用 | ( N* F |$ Q u7 \5 V' G; A
$ S; L' ^0 a# W1 n3 Q' m0 d
4 @* J3 x& m( _( m4 \ c6 `
4 C$ ^3 W6 g# s5 Y5 Z) [! Y% H- T |
评分
-
查看全部评分
|