Solved

AS3/XML parse XML nodes with attributes

Posted on 2009-06-30
1
558 Views
Last Modified: 2013-11-11
Here is the XML section I am trying to load into several dynamic text fields within the Flash piece.  Problem:  I am not sure what to do with the syntax forming of the XML within the AS3 path structure.  It keep erring out.  Please look at my code for the Flash and the XML, which will not be able to be changed.

Within the code below I recieve:
1078: Label must be a simple identifier.
XML node I need to pull in from:
 
<fh:FlightHistory FlightHistoryId="163872441" DepartureDate="2009-06-30 09:00" ArrivalDate="2009-06-30 10:33" PublishedDepartureDate="2009-06-30 09:00" PublishedArrivalDate="2009-06-30 10:33" ScheduledGateDepartureDate="2009-06-30 09:00" EstimatedGateDepartureDate="2009-06-30 09:00" ActualGateDepartureDate="2009-06-30 08:56" ScheduledGateArrivalDate="2009-06-30 10:33" EstimatedGateArrivalDate="2009-06-30 10:21" ScheduledRunwayDepartureDate="2009-06-30 09:07" EstimatedRunwayDepartureDate="2009-06-30 09:06" ActualRunwayDepartureDate="2009-06-30 09:07" ScheduledRunwayArrivalDate="2009-06-30 10:19" EstimatedRunwayArrivalDate="2009-06-30 10:27" FlightNumber="2795" StatusCode="A" Status="Active" CreatorCode="O" ScheduledAirTime="72" ScheduledBlockTime="93" DepartureAirportTimeZoneOffset="-5" ArrivalAirportTimeZoneOffset="-5" ScheduledAircraftType="ERJ" DepartureGate="22" ArrivalGate="B79" TrackingEnabled="False">
        <fh:Airline AirlineCode="XE" Name="Expressjet"/>
        <fh:Origin AirportCode="TUL" Name="Tulsa International Airport" City="Tulsa" StateCode="OK" CountryCode="US"/>
        <fh:Destination AirportCode="IAH" Name="George Bush Intercontinental Airport" City="Houston" StateCode="TX" CountryCode="US"/>
      </fh:FlightHistory>
 
AS3 syntax:
flight_mc.airline_txt.text = contentInput.channel.item.fh:FlightHistory;

Open in new window

0
Comment
Question by:cubical38
[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
1 Comment
 

Accepted Solution

by:
cubical38 earned 0 total points
ID: 24747254
ANSWER:

URI is found at the top of the XML

namespace someNamespace = //put the namespace URI for fh suffix here
contentInput.channel.item.someNamespace::FlightHistory;
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
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 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…
Suggested Courses

734 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