简体   繁体   English

如何使用ActionScript 3.0在Flash中动态创建表

[英]How to create a table dynamically in flash using actionscript 3.0

I am very new to flash and actionscript. 我是Flash和ActionScript的新手。 I'd like to create a table dyanmically using actionscript code. 我想使用动作脚本代码动态创建一个表。 Please help me. 请帮我。

Thanks in advace. 非常感谢。

If you are referring to a dynamic array, then Action script has native support for dynamic random access containers in the form of their Array() object. 如果要引用动态数组,则Action脚本以其Array()对象的形式对动态随机访问容器具有本机支持。

Simply instantiating a new Array object. 只需实例化一个新的Array对象。 Just keep in mind that you are responsible for managing the distribution of data in the container yourself. 请记住,您有责任自己管理容器中的数据分布。 The object will not automatically compress itself if you simply remove an element in the middle of the array. 如果仅删除数组中间的元素,则对象将不会自动压缩自身。

An example. 一个例子。

var numbers:Array = new Array();

numbers.Push("Five");
numbers.Push("Twelve");
numbers.Pop();

Here: 这里:
http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7fdc.html http://help.adobe.com/zh_CN/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7fdc.html
A full documentation on working with arrays and vectors. 有关使用数组和向量的完整文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM