Help - Search - Members - Calendar
Full Version: XML in flash
HTMLHelp Forums > Web Authoring > Graphics, Flash and Multimedia

I am pretty new to Flash (and AS)... I am trying to display data from a mySQL database in flash...
I have configured my server to pierce xml as PHP... So I have a XML file with all of the data from the database...

I would now like to display this in Flash...
As I said: I really don't know a whole lot of Flash... I am working in AS2.
I have set up a dynamic text box called: "xmlBox"... This is my XML:

<?php header('Content-type: text/xml'); ?>


$error = "Couldn't connect".mysql_error();

$connect = mysql_connect("localhost", "root", "") or die($error);
mysql_select_db("mydatabase") or die($error);



$q="SELECT id,title,body,UNIX_TIMESTAMP(pubDate) AS pubDate
FROM mytable ORDER BY pubDate DESC LIMIT 0,15";

while($result = mysql_fetch_array($doGet)){
        <title> <?=htmlentities(strip_tags($result['title'])); ?></title>
        <description> <?=htmlentities(strip_tags($result['body'],'ENT_QUOTES'));?></description>
        <pubDate> <?=strftime( "%a, %d %b %Y %T %Z" , $result['pubDate']); ?></pubDate>
<?php } ?>


This works great!

Here is my AS2:

var myXML = new XML();
myXML.onLoad = function(sucess){

This gives me some bazar combination of letters in the text box:


I have no clue what this is... When I "trace" "this" it all shows up (all of the xml)...

What are all of those weird letters? How can I just display all of the XML? Is there a simpler way to just display all of my XML?

Thanks in advance! smile.gif


One thing I noticed:
When I select the "bazar jumbled text" like:

and copy it, then paste it (in text edit). It says this:
<br /><b>Parse error</b>:  syntax error, unexpected & a p o s;

*NOTE* I had to add those spaces after the & because otherwise it makes a: '

So, what I am seeing in my SWF, (and copying) is not actually what the text is (when I paste it)... What does that mean? What Is going on??

Please... Any help? wacko.gif

Hey! Sorry... I am quite new to Flash...
The issue was that text was not set to "TLF"... Once I set it to that, the text worked fine...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.