Код: Выделить всё
trace(array.join(","))//Помещаем массив строку с разделителем ","
Код: Выделить всё
trace(array.join(","))//Помещаем массив строку с разделителем ","
Код: Выделить всё
function print_r(data:Array, t:String = ''):String{ var output:String = t+"Array(\n"; for (var name:String in data) { if ((data[name] is Array)) output += t + "\t" + name + " => \n" + print_r(data[name], t + "\t\t"); else output += t + "\t" + name + " => " + data[name] + "\n"; } output += t+");\n" return output;}
Код: Выделить всё
var array:Array = new Array();array['one'] = [1, 'Ivan'];array['two'] = [2, 'Alexey'];array['three'] = 777;array['four'] = [0, 1, 2];trace(print_r(array));
Код: Выделить всё
Array( one => Array( 0 => 1 1 => Ivan ); two => Array( 0 => 2 1 => Alexey ); three => 777 four => Array( 0 => 0 1 => 1 2 => 2 ););
Код: Выделить всё
var array:Array = [new MovieClip(), function ():int{return 1}, ["2","8"]];trace(JSON.stringify(array));trace(print_r(array));
Код: Выделить всё
[{"accessibilityImplementation":null,"width":0,"needsSoftKeyboard":false,"height":0,"trackAsMenu":false,"alpha":1,"graphics":{},"contextMenu":null,"x":0,"y":0,"z":0,"name":"instance1","currentFrameLabel":null,"enabled":true,"currentLabel":null,"rotation":0,"parent":null,"soundTransform":{"volume":1,"rightToLeft":0,"pan":0,"leftToLeft":1,"leftToRight":0,"rightToRight":1},"scaleX":1,"scaleY":1,"currentScene":{"name":"","labels":[],"numFrames":1},"currentFrame":0,"framesLoaded":1,"root":null,"stage":null,"totalFrames":1,"scenes":[{"name":"","labels":[],"numFrames":1}],"mask":null,"visible":true,"scaleZ":1,"rotationX":0,"mouseX":376,"mouseY":400,"rotationZ":0,"isPlaying":false,"rotationY":0,"opaqueBackground":null,"scrollRect":null,"cacheAsBitmap":false,"blendMode":"normal","numChildren":0,"filters":[],"scale9Grid":null,"transform":{"concatenatedColorTransform":{"alphaMultiplier":1,"greenOffset":0,"alphaOffset":0,"blueOffset":0,"redOffset":0,"blueMultiplier":1,"greenMultiplier":1,"redMultiplier":1,"color":0},"pixelBounds":{"width":0,"height":0,"x":0,"y":0,"bottom":0,"size":{"x":0,"y":0,"length":0},"top":0,"left":0,"topLeft":{"x":0,"y":0,"length":0},"bottomRight":{"x":0,"y":0,"length":0},"right":0},"matrix3D":null,"matrix":{"c":0,"d":1,"a":1,"tx":0,"b":0,"ty":0},"colorTransform":{"alphaMultiplier":1,"greenOffset":0,"alphaOffset":0,"blueOffset":0,"redOffset":0,"blueMultiplier":1,"greenMultiplier":1,"redMultiplier":1,"color":0},"perspectiveProjection":null,"concatenatedMatrix":{"c":0,"d":5,"a":5,"tx":0,"b":0,"ty":0}},"buttonMode":false,"tabChildren":true,"mouseChildren":true,"loaderInfo":null,"dropTarget":null,"hitArea":null,"accessibilityProperties":null,"tabIndex":-1,"focusRect":null,"useHandCursor":true,"mouseEnabled":true,"doubleClickEnabled":false,"textSnapshot":{"charCount":0},"tabEnabled":false,"softKeyboardInputAreaOfInterest":null,"currentLabels":[]},null,["2","8"]]
Код: Выделить всё
Array( 0 => [object MovieClip] 1 => function Function() {} 2 => Array( 0 => 2 1 => 8 ););