I'm trying to get the values contained in the following XML
<user>
<id type="integer">122</id>
<name>newuser</name>
<email>newuser@user.com</email>
<created_at type="datetime">2011-08-31T19:16:52Z</created_at>
[Code] .....
But in the debugger I can see that the vars XMLNAME< XMLEMAIL & XMLPoints are all being created but they are empty strings. How can I navigate to their values?
1.Read in a text file. e.g containing text like this, teacher/student/1/sn/2/3/4/5/9/f/tn/02/
2.pass it to a string.
3.then beable to extract different parts of the string and place them in different arrays.
The bit I dont know how to do is the extracting specific parts of the string? Is it possible to search for / and to treat what comes after it as a specific peice of information until the next / is read? Or perhaps there is a more efficient approach?
I meant to call it "Convert a value to a variable". Using CS3, AS2: If I have a variable that's a string value = the name of another variable, can I extract the value and then look for the extracted value's matching variable name to get it's value?
Ex:
color = "blue" box = "color"
(Assuming I don't know the value of box) How would I get the value of "box" out so I could search for the value "color" as if it were a variable? I need to convert a value to a variable name is what i'm getting at... I think.
When you want to split a string in to an array, seperated by the letter "e" for example. So string: 0e5e8e7 would become 0,5,8,7..[code]Is there a way you could split a string by multiple values? So instead of it splitting the string when it comes across "e", could you have it split when it comes across "e", or another character.
I meant to call it "Convert a value to a variable".Using CS3, AS2:If I have a variable that's a string value = the name of another variable, can I extract the value and then look for the extracted value's matching variable name to get it's value?[code](Assuming I don't know the value of box) How would I get the value of "box" out so I could search for the value "color" as if it were a variable? I need to convert a value to a variable name is what i'm getting at.
i am trying to tell flash to put some text on a dynamic textfield on stage based on some variables written on the URL in the browsers address bar, sort of like how PHP uses $_GET.so for example, i have a file called "embed_page.php" and embedded in it is a swf file called "dynamic.swf"UrL>..trace("name is: " + n + " and color of choice is: " + c + " and gender is: " + g);if only i could get access to the URL in the address bar, i could play around with indexOf and slice to get the values i want...
I'm having a hard time wrapping my head around this problem. I have 2 unsorted arrays that need to be compared, array2 must contain all elements of array1 and array2 can any number of extra elements without affecting the result. I don't see any benefits from sorting the arrays and comparing the string values as array2 can have extra information causing noise.
I have a project made in flex, using php data services to access a sql server database, and I need to convert it to mysql, I have changed all my php services from sqlsrv to mysqli. Something like this:
It worked fine on sqlsrv but with mysqli it returns to flex the INT, BIT or DATE values as string the main Datatypes on mysql are INT,VARCHAR,BIT(1),DATETIME,DATE (same as sqlsrv) and on the flex the return types are mainly as object[]
Kirupa's tutprial "Using XML in Flash CS3/AS3" when filtering the node values, how can I match a text string say "Stephen" with "Stephen E. Ambrose" var authorList:XMLList = bookInput.Book.(author == "Stephen E. Ambrose"); Using the above code it only searches the node which author value is "Stephen E. Ambrose" but I want to search only "Stephen" and want to get this node returned.
I have piece of ActionScript code which is supposed to evaluate a string of HTML and break it up into individual pieces. So a string like <p>Hi</p><span>Hi</span><a href="index.php">Hi</a> would be translated into:
However, when I run a test version of this code, I get a value of null in return. I'm pretty sure my regexp string is good, but I'm doing something wrong in ActionScript. My code is below: var evaluatedInput:RegExp = new RegExp('/<([A-Z][A-Z0-9]*)[^>]*>(.*?)</1>/'); var output:Object = evaluatedInput.exec("<p>Hi</p><span>Hi</span><a href="index.php">Hi</a>"); trace(output);
for instance distance values,and temperatures For instance say I have a string containing some unknown inches value And the inches sign can either be the proper double prime OR double quotes. So, I'm guessing as a first step I would search for double prime or double quotes preceded by a number value, then parse out and convert this number value. But this doesn't seem foolproof for instances when it is actually a doublequote, NOT an inches sign
someThin.text = String(value1) I'm using the above code to pass an integer to a dynamic textBox.The problem is I'd like to post a second variable (value2) in the same textBox as well as a '/' between them. I could use multiple textboxes but that just seems sooooo inefficient.
I've tried the following permutations and none have worked.
This code adds two string values but creates a "forced" new line. I wonder if there is a way to concatenate without the "/n" newline character being forced upon rendering.
I'm working with a web service and am returning an array to a field (that I set the data type as an Array). The result thus far is "[object Object]". How can I get the array values back out as a string?
I upgraded to Flash CS4 and found out i dont like actionscript 3. i have an older flash site I opened in CS4 and all the actionscripts work on the scenes. I began a new flash file and created scenes with the actionscript 2, but it wont let me enter the script in the actionscript window. Here is an example of what i am using to navigate with buttons. Can someone chime in and show me a simple method to navigate thru the scenes with actionscript 3 or how to continue to use actionscript 2.
Im building a flash app that has variouse movs embedded in the one file. Basically i have 2 frames on my main time line.. within one of those frames i have a movie clip with the instance name 'pan' and within 'pan' i have a button and a movie clip called 'inpan'. Basically what i want is when someone clicks on the button (inside pan) i want the movieclip 'inpan' to jump to the second frame.. the action im trying to add to the button is..
I built a drop-down menu navigation scheme in Flash. I've inserted it into my Dreamweaver page, but the links don't work. They only work if you were to set it to open up in a new window. Is it possible to have your main navigation be a Flash file, but link to your Dreamweaver pages?
When I click on different pages in my flash, for a split second, a white flash shows up, almost as if it's just a blank white page. How can I stop this from happening? It only seems to happen when I loaded the flash into an HTML document. Is there a code I can put in th actionscript to stop it?
i want to gor from movieclip to scene 1, where i have set my menu on timeline.
Actually i have main movieclip on main timeline of scene 1, and inside that main movieclip , i'm having number of sub movieclips, so from that any movieclip i want go back return to scene 1.
I am sending a string to asp from flash that looks like this;
[CODE].....
The problem is when asp (probably php too) reads this string, it reads it like this
[CODE]....
Now this sucks, is there a way to encrypt my flash string so asp will read the string corectly? I know asp is url encoding the flash string, but this bit of info does not seem to help.