I have an old project where there is Variable that holds a string and I want to convert it to Array When I trace this variable (myVar) it shows this string
[Code]...
Something like in loop var myArr:Array = push(myVar[i]) I think can split it. But can't find the right string where I can split and create Array
When importing a variable from an external .txt file, I know that it will not properly import an array. I rember seeing a way to convert the string to an array, but I can't find it. Does anyone know the code?
I have used the search button to attempt to find the answer, however that proved fruitless. I know i have seen it somewhere around here, but I just can't find it again.
P.S. Does anyone know if you can import a .txt file from the net if it is imported into a .exe file running on a computer? The computer would have a connection to the internet at the time. would I just put an absolute path into the file parameter? Like: [URL]
I'm trying to use one .as file to provide the code for a image gallery that will load different image sets for each web page. I'm using SWFObject to load the .swf and passing it FlashVars like this:
is it possible to do this? And if so how? the xml is converted to an Object using XLEFF; there are five nodes en the specified path: var path:String = "mCb.mXMLloaderObj.dm.lang[0].menu[0].node.length"; trace(path) this will offcourse output just the path as a string. But I want to trace something like: trace(Object(path)); and hopefully get the number 5, which represents how many nodes there are in the specified path in the Object. Is this possibly? Because I can't find anyway to do this
Is there any built in functionality to convert an ArrayCollection to a jagged string array? I have an Arraycollection of objectproxies that I get from a SOAP webservice (asp.net datatable) that I modify and want to send back.
There's an array, lets called it arr1. There is a switch, that pushes argument to this array, but after the switch ends, I'm stuck at join("").split("");
var arr1 = []; switch (myString) { case "apple": { arr1.push("apple"); break; }}} arr1 = arr1.join("").split("");
I know is simple, but I never had experience with arrays in flash before, I just realized join("") was used to convert the Array to string, but isn't split reversing this?
I needed to convert a string representing an array , like :
Code: var a:String = "[u,[[a,b],[l,m,r,a,f,g,h],[u]],[c,q],d]" into a real Array, so I started looking in forums, but I couldn't find it, so I wrote my own
I am looking for a way to check if any sting of the Array is matched to the string that in the TextField. In the code it should be something like that:
Code: var TestString:Array = new Array ("chicken", "cat", "dog"); function LookStringArray(){ if (TestArrayTextfield_txt.text == (anyString.TestString)){
So I am trying to take an XML document, load it in, then organize the elements into an array of Objects with the elements nodes as the properties of each object.All of that I am able to do so far.What is the real problem here for me is when I try to take one of the properties and try to assign it to a dynamic Textbox's .text property.I can trace the object property, but it will not go into a textbox.[code]Also, I noticed that when the code hits the first output error, it never executes the rest of the code in the changeQuestion function; or else I would have gotten more than one output error.
I have an array of string values that represent accessors to another array. I need to be able to use those to access the secondary array, so I need to find a simple way to convert the string to the actual array accessor.[code]...
However, it seems like there should be some way to cast the string into AS, that Flash can use to access the proper array, without having to do the complex string.slice statement.
Something like: var str:String = ActionScript(arr3[i]); would be much easier to type, as many times as I'm going to need it, than the .slice statements.
It is possible to converta string to a name?want to make a text to speech project that plays the sounds by name and i use the charAt function to split the text.[code]...
how to convert a string to an int...here's the thing when I use Number(myVar) it returns NaN. The string that I am trying to parse has a leading number followed by because I'm using loadVars and in order to make it more readable I'm trying to make a new variable on everyline....how I can do this I just need to remove the .