473,788 Members | 2,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[Flash8] Dynamic Text Fields / XML / spacing

2 New Member
So I have a project where there are 5 dynamic text fields, and I thought it would be quite simple. Create a dynamic text field, and then load in the .xml content, and I had it complete. However, it turns out that spacing is quite important, so my method will not work, and I'm kind of stumped how to proceed. Here is a visual representation of how it is layed out:



So the things highlighted in red represent the .xml nodes, and as the width (character count) of TEAM1 and TEAM2 change, the spacing needs to remain consistant, and the static elements (the "vs." and "|" need to move accordingly, and the TEAMLOCATIONS need to stay lined up as well...

Does anyone have a good idea how to handle this, or a good tutorial they could point out? I'm trying to build my own array structure, and calculate the width of "TEAM1", but it's slow going... Any ideas would be greatly appreciated.

Here's the source code without the spacing stuff happening:
[PHP]
function loadXML(loaded) {
if (loaded) {
_root.teamcity1 = this.firstChild .childNodes[0].childNodes[0].firstChild.nod eValue;
_root.teamname1 = this.firstChild .childNodes[0].childNodes[1].firstChild.nod eValue;
city_txt.text = _root.teamcity1 ;
name_txt.text = _root.teamname1 ;
_root.teamcity2 = this.firstChild .childNodes[0].childNodes[2].firstChild.nod eValue;
_root.teamname2 = this.firstChild .childNodes[0].childNodes[3].firstChild.nod eValue;
city2_txt.text = _root.teamcity2 ;
name2_txt.text = _root.teamname2 ;
_root.thetime = this.firstChild .childNodes[0].childNodes[4].firstChild.nod eValue;
time_txt.text = _root.thetime;
} else {
content = "file not loaded!";
}
}

xmlData = new XML();
xmlData.ignoreW hite = true;
xmlData.onLoad = loadXML;
xmlData.load("g ames.xml");[/PHP]

And the XML

[PHP]<?xml version="1.0" encoding="ISO-8859-1"?>

<games>
<team>
<city1>BALTIMOR E</city1>
<name1>REDSKINS </name1>
<city2>CINCINNA TI</city2>
<name2>BENGAL S</name2>
<thetime>12:00E T</thetime>
</team>
</games>[/PHP]


Thanks!

-EmoJoy
Aug 18 '07 #1
0 3083

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1367
by: bjam | last post by:
Hi, I am trying to do the following, which is to have a single place to define my table paramaters such as cellpadding / cellspacing etc. Below is the code I am trying to achieve see the cell spacing element in the table html tag below. Thanks in advance for any help you can provide. I really appreciate it. This is currently not working as I can't have an xsl:value-of select inside of the table tag itself... does anyone have any ideas...
3
1831
by: puunda | last post by:
Hi, Hope I've posted to the right groups. I'm trying create a Crystal Report for the first time using C# (novice at that as well). The CR I can handel. What I want to do is to have a whole bunch of fields in my application (winforms) which the user can select to include in the report or not. I believe I can use the CR Engine to change the report at runtime. Here
1
17673
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to Create a Dynamic Crosstab Report PRODUCT :Microsoft Access PROD/VER:1.00 1.10 OPER/SYS:WINDOWS
1
3339
by: Richard Hollenbeck | last post by:
Hello Newsgroup. You have all been very helpful in the past and I thank you. I try to ask relevant questions so that they don't just benefit me, but also benefit the group. I'm currently overwhelmed by useless examples across the web on how to make "dynamic crosstab reports" without myself having a basic understanding about how to retrieve and assign recordsources, etc., from fields in a query to fields in the report. I see all these...
4
1734
by: sandy82 | last post by:
Hi I want to interface my winforms application with External API of Flash 8 . If any one has done a similar problem do ... guide ..
0
4201
by: numbnutz | last post by:
Hi, I am currently working on an XML Gallery for my girlfriend's brother who is a photographer. I have created a flash front end template and am using an XML database to load the images and accompanying captions. The gallery has more than one image and the user can navigate the gallery by clicking forward and backward buttons to take then through the images: var galleryXML = new XML(); galleryXML.ignoreWhite = true;...
3
18719
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however, working with complex reports is tricky Assumption: Reader of this article have basic knowledge of creating data reports. Creating a Parent-Child Command and create a DataReport Suppose we have a database called company with two tables ...
1
4661
by: MaryamSh | last post by:
Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button ,another row will be created with the same control (I mean another dropdown and 2 button) and so on. and by pressing Remove button the selecetd row will be removed. I used viewstate to keep my value for postback, I want by changing selectedvalue of...
0
3502
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button ,another row will be created with the same control (I mean another dropdown and 2 button) and so on. and by...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10118
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5403
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.