Solved

XML as an array

Posted on 2003-12-10
3
241 Views
Last Modified: 2010-04-03
I have an xml file containing swear words that I want blocked from my input boxes in flash. I want to know how I can turn this xml file into an array in flash, then when my submit button is pressed, it checks the input box for any of these words and if it finds one, my dynamic text box says "no swearing"

<?xml version="1.0" encoding="UTF-8"?>
<swearArray>
      <item label="mouse"/>
      <item label="dog"/>  //These are just examples
      <item label="cat"/>
</swearArray>

Any tutorials, source codes, or anything like that would be a great help.
Thanks
Edders
0
Comment
Question by:edders85
3 Comments
 
LVL 39

Accepted Solution

by:
blue-genie earned 80 total points
Comment Utility
Hi there. Go have a look at the other thread that's dealing with the same type of thing.
(In the previously answered questions - PAQ)

I tried that using attributes, but I couldn't get it to pull the attribute out nicely (I'm not a xml guru) - but that should give you an idea how to do it, or alternatively, rewrite your xml.

blu.
0
 
LVL 9

Expert Comment

by:OBCT
Comment Utility
Edders85,

I am no xml expert either, however using <item label> is something you would use populate a componant (combo box for example). Using blu's suggestion in the following question would be alot more effective for what you are trying to achieve.
http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_20823812.html

Cheers

-OBCT
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now