for the confusion.
Hal
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy Herrman
Sent: Wednesday, September 12, 2007 6:31 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] toString(aArray[i]) ?? does this work
You say [object Object
[EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, September 12, 2007 8:30 AM
Subject: Re: [Flashcoders] toString(aArray[i]) ?? does this work
You say [object Object] is the correct output if the object is a
movie clip. This isn't the behavior I see. Any time I trace
What is stored in the Array?
- Original Message -
From: [EMAIL PROTECTED]
To: Flash Coders flashcoders@chattyfig.figleaf.com
Sent: Tuesday, September 11, 2007 5:30 AM
Subject: [Flashcoders] toString(aArray[i]) ?? does this work
Quick question, can I toString an array element.
ie
PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, September 10, 2007 8:30 PM
To: Flash Coders
Subject: [Flashcoders] toString(aArray[i]) ?? does this work
Quick question, can I toString an array element.
ie: var myStr:String = toString(aArray[i]);// where 'i' is the
increment.
I
] toString(aArray[i]) ?? does this work
Quick question, can I toString an array element.
ie: var myStr:String = toString(aArray[i]);// where 'i' is the
increment.
I am having an issue with this. when I trace myStr it traces [object
object]
instead of what I intended/expected
You're using toString wrong. toString is a native method of objects.
Use:
aArray[i].toString()
or
String(aArray[i])
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
toString() is a method of the Object class and it doesn't have any
arguments. So while every object in Flash has a toString method, by
default it returns [object Object]. From your code it looks like
what you're actually doing is calling this.toString(), you probably
want to do something like
] toString(aArray[i]) ?? does this work
I think what you really want is this:
var myStr:String = aArray[i].toString();
I don't know of any global toString() function. What's probably
happening is that you're doing the equivalent of
`this.toString(aArray[i])`. The scope object's toString
var myStr:String = aArray[i].toString();
HTH,
Mark
On 9/11/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Quick question, can I toString an array element.
ie: var myStr:String = toString(aArray[i]);// where 'i' is the
increment.
I am having an issue with this. when I trace
] toString(aArray[i]) ?? does this work
Quick question, can I toString an array element.
ie: var myStr:String = toString(aArray[i]);// where 'i' is the
increment.
I am having an issue with this. when I trace myStr it traces [object object]
instead of what I intended/expected
] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, September 10, 2007 8:30 PM
To: Flash Coders
Subject: [Flashcoders] toString(aArray[i]) ?? does this work
Quick question, can I toString an array element.
ie: var myStr:String = toString(aArray[i]);// where 'i' is the
increment.
I am
Andy,
I see what you are saying, I think. That the .toString()
has to be used as a method directly being addressed by the
object. Like I said that what I think you are saying. How
ever it seems I still can not get the string myMCinArray1
or myMCinArray2 or myMCinArray3 etc when I
Quick question, can I toString an array element.
ie: var myStr:String = toString(aArray[i]);// where 'i' is the
increment.
I am having an issue with this. when I trace myStr it traces [object object]
instead of what I intended/expected mcMovieClipName14 as a string.
Any insite
13 matches
Mail list logo