Solved

XML as an array

Posted on 2003-12-10
3
246 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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…
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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…

627 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