Hi,
I'm populating an array with objects.
When I trace out the array I get
==[object Object]
Whats the best way to trace out the contents of the objects once they're
in the array?
There are different ways
It could be as simple as
trace( myArray.toSource( 0 ) );
for more info see:
toSource toschmorze.
Array.prototype.trace = function() {
var retString = Array contents:+newline;
for (var i = 0; ithis.length; i++) {
retString+=i+: ;
if (typeof (this[i]) == object) {
for(var prop in this[i]){
toSource toschmorze.
Meaning ?
Array.prototype.trace = function() {
var retString = Array contents:+newline;
for (var i = 0; ithis.length; i++) {
retString+=i+: ;
if (typeof (this[i]) == object) {
for(var prop in this[i]){
Try using Xray http://osflash.org/xray
It comes with a tt(YourObject) method that will recursively trace your
objects. It also allows you to inspect objects, MovieClips or whatever is
in your Flash movie and manipulate them with a GUI at run-time. It's
freaking great!
-Chris
You can also just use the XrayTrace class if you'd like and modify it to
your liking. One thing that it has built in is recursion checking - ie -
you won't hit a 256 levels of recursion error, which wasn't addressed in the
above mentioned methods. If you have an array with objects or pointers
Hi
I'm populating an array with objects.
When I trace out the array I get
==[object Object]
Whats the best way to trace out the contents of the objects once they're in
the array?
Thansk in advance
Jim Bachalo
[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca
, 19. Januar 2006 00:18
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Q:Tracing out objects in an array
Hi
I'm populating an array with objects.
When I trace out the array I get
==[object Object]
Whats the best way to trace out the contents of the objects once
they're in the array
7 matches
Mail list logo