Solved

XML as an array

Posted on 2003-12-10
3
243 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
ID: 9926791
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
ID: 9933198
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
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.

808 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