Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 16th, 2002, 09:49 AM
rob5408 rob5408 is offline
Certified Genius
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: over there
Posts: 77 rob5408 User rank is Private First Class (20 - 50 Reputation Level)rob5408 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 46 m 57 sec
Reputation Power: 7
Send a message via AIM to rob5408
xml and flash

i have a real simple xml doc (quickinfo.xml) with info about buildings in it that looks like this...

<?xml version="1.0"?>
<quickinfo>
<building bname="Alumni House"
description="Fenstemaker Alumni House built in 1967."
instructions="Click left menu or building image." />
</quickinfo>

(more buildings than this)
based on whatever button a user clicks it will load this info into a dynamic text field. however i can't get flash to get to the right part of the tree...this is just test code to see if i could get one of the building names to show up. (i took out the "if (success) {}" part and opted to just throw the value in the output window)

quickinfo = new XML();
quickinfo.onLoad = QIOnLoad;
quickinfo.load("quickinfo.xml");
function QIOnLoad (success) {
trace("Success is " + success);
var buildingListNode = this.firstChild;
trace("Node bname: " + buildingListNode.childNodes[0].attributes.bname);
}

its prolly just a stupid error...as with all of my errors...thanks, rob

Reply With Quote
  #2  
Old January 17th, 2002, 04:25 PM
rob5408 rob5408 is offline
Certified Genius
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: over there
Posts: 77 rob5408 User rank is Private First Class (20 - 50 Reputation Level)rob5408 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 46 m 57 sec
Reputation Power: 7
Send a message via AIM to rob5408
nevermind

i got it...it was a combo problem between flashes problems with whitespace and my problem with book learnin...

Reply With Quote
  #3  
Old January 17th, 2002, 04:28 PM
TotalMonkey TotalMonkey is offline
Polynesian Monkey God
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Location: Monkeytown, USA
Posts: 57 TotalMonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 42 sec
Reputation Power: 7
so what was the solution? was there actually an error in your actionscript aside from not accounting for whitespace?

TotalMonkey
__________________
"We're all - monkeys!" -- Jeffrey Goines, 12 Monkeys

Reply With Quote
  #4  
Old January 18th, 2002, 05:11 PM
rob5408 rob5408 is offline
Certified Genius
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: over there
Posts: 77 rob5408 User rank is Private First Class (20 - 50 Reputation Level)rob5408 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 46 m 57 sec
Reputation Power: 7
Send a message via AIM to rob5408
solution

one part of the problem is that when flash 5 first came out their xml handling was a bit screwy about carriage returns and whitespace...its kinda been fixed since build 30 or sumpin...but it has to be one straight line in order for older flash players to work well...the other issue i had was with flash not being able to handle text node aside from "parent nodes" so instead of having your data in tags like

<id>1234567890</id>

you have to have it in attributes like...

<person id="1234567890"></person>

third problem was my abismal failure of programming...to go deeper into nodes i figured i would just use notation like...

mainnode.firstchild.firstchild and so on...

so by that rational i just wrote...

mainnode.firstchild.attributes.id

but it worked when i changed it to

myArray = new array;
myArray = mainnode.childnodes;
which returns an array of references to the children
then myArray[x].attributes.id to grab the info i wanted...

hopefully that makes sense...rob

Reply With Quote
  #5  
Old January 25th, 2002, 10:30 AM
sykes sykes is offline
Blabbermouth Wanker
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: New York
Posts: 60 sykes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
my advice, GO HERE , it's a prototype function by Branden at Figleaf that not only re writes the ignore whitespace to cover all flash 5 players, but also stops the flash lock up when parsing XML and allows you to show a preload bar of the XML data coming in.

And it's free.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > xml and flash


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway