...

View Full Version : problems setting a variable in XML



jasonc310771
11-26-2008, 03:24 AM
i have an XML file which is used by a FLA flash movie.

i have changed the extention to PHP to allow me to get the info for the XML from mysql database.

but need to setup a variable with a username of the info i want to get, prior to the database being checked.

so i have one php file like so...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>




<body>
<? $owner = "Daniel"; ?>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="670" height="670">
<param name="movie" value="photoalbum_show_imagesV2a.swf">
<param name=quality value=high>
<embed src="photoalbum_show_imagesV2a.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="670" height="670"></embed>
</object>
</body>
</html>


the SWF file is a flash slideshow which gets the image details using the XML file... which i have renamed to be a PHP file.



get_image_names.php


<?php echo('<?xml version="1.0" encoding="utf-8" standalone="yes"?>'); ?>
<?php
include("dbconfigfile.php");
$xmls = @mysql_query("SELECT * FROM `photo_album_xmls` WHERE `owner` = '" . $owner . "'") or die(mysql_error());
?>

<images>
<?php
while($rows=@mysql_fetch_array($xmls)){
?>
<pic>
<image>http://www.domain.com/<?php echo($rows[url]);?></image>
<caption><?php echo($rows[desc]);?></caption>
</pic>
<?php
}
?>
</images>


but the variable 'owner' is the username and this for some reason does not get seen by the SWF file.

how do i embed this info into the <object> part so that the SWF file will use it to get the info need from the database.

shyam
11-26-2008, 03:41 PM
how do i embed this info into the <object> part so that the SWF file will use it to get the info need from the database.

use the complete url to the php script instead of the relative path of the php file

oesxyl
11-26-2008, 03:42 PM
i have an XML file which is used by a FLA flash movie.

i have changed the extention to PHP to allow me to get the info for the XML from mysql database.

but need to setup a variable with a username of the info i want to get, prior to the database being checked.

so i have one php file like so...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>




<body>
<? $owner = "Daniel"; ?>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="670" height="670">
<param name="movie" value="photoalbum_show_imagesV2a.swf">
<param name=quality value=high>
<embed src="photoalbum_show_imagesV2a.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="670" height="670"></embed>
</object>
</body>
</html>


the SWF file is a flash slideshow which gets the image details using the XML file... which i have renamed to be a PHP file.



get_image_names.php


<?php echo('<?xml version="1.0" encoding="utf-8" standalone="yes"?>'); ?>
<?php
include("dbconfigfile.php");
$xmls = @mysql_query("SELECT * FROM `photo_album_xmls` WHERE `owner` = '" . $owner . "'") or die(mysql_error());
?>

<images>
<?php
while($rows=@mysql_fetch_array($xmls)){
?>
<pic>
<image>http://www.domain.com/<?php echo($rows[url]);?></image>
<caption><?php echo($rows[desc]);?></caption>
</pic>
<?php
}
?>
</images>


but the variable 'owner' is the username and this for some reason does not get seen by the SWF file.

how do i embed this info into the <object> part so that the SWF file will use it to get the info need from the database.
this could be a flash or php question but not xml. ask one of the moderators to move your thread in one of this forums if you want an answer.

regards

jasonc310771
11-26-2008, 03:51 PM
how do i request that this post be moved?

oesxyl
11-26-2008, 04:02 PM
how do i request that this post be moved?
good question, :) I never really know but I suppose you can PM one of them. See the user profile of one of the moderators from the bottom page of the forum.

best regards

Alex Vincent
11-26-2008, 08:30 PM
I can move it, just tell me which forum you prefer. :)

(I generally read all traffic in this forum.)

oesxyl
11-26-2008, 08:40 PM
I can move it, just tell me which forum you prefer. :)

(I generally read all traffic in this forum.)
I guess in flash forum:



but the variable 'owner' is the username and this for some reason does not get seen by the SWF file.
don't seems to be a php problem, but I'm not sure.

best regards



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum