Externally updating pages in a flash website
#1
Posted 26 January 2007 - 03:55 PM
I know a little bit about XML and basically nothing about PHP, which I assume are the ways to go about this?
This is really important for me to do.. please help. Thanks.
#2
Posted 26 January 2007 - 07:14 PM
http://www.community...e.cfm?cid=D1CB3
Edited by Ben, 26 January 2007 - 07:16 PM.
#3
Posted 26 January 2007 - 07:18 PM
If you are going to update it via the website file manager, the only thing you'd need is XML. If you can't use a textfile do you want to be able to add images aswell? Well, it can all be done in XML. Here's a tutorial that should help you:
http://www.community...e.cfm?cid=D1CB3
Yes, I want to be able to add images as well. I'm taking a look at the tutorial now, thanks for the link. Hopefully I'll be able to get it.
#4
Posted 26 January 2007 - 07:50 PM
#5
Posted 26 January 2007 - 08:15 PM
Try this tutorial instead (I looked through this one and it's good ):
http://www.spoono.co...orial.php?id=21
Edited by Ben, 26 January 2007 - 08:16 PM.
#6
Posted 26 January 2007 - 09:05 PM
I tried adding images, and once I did that it would only say "undefined" and not load anything of what I had put.
#7
Posted 27 January 2007 - 12:19 AM
<?xml version="1.0"?> <firstChild> <childNode title="Title" image="Image.jpg" /> </firstChild>Then use the loadMovie() method to load the image into an empty movieclip:
_root.createEmptyMovieClip("imageHold", getNextHighestDepth()); imageHold.loadMovie(xmlObj.firstChild.childNodes[0].attributes["image"]);
Edited by Ben, 27 January 2007 - 12:20 AM.
#8
Posted 27 January 2007 - 03:43 AM
#9
Posted 27 January 2007 - 06:39 AM
#10
Posted 27 January 2007 - 06:42 AM
#11
Posted 27 January 2007 - 06:43 AM
#12
Posted 27 January 2007 - 06:49 AM
Edited by darkson01, 27 January 2007 - 06:51 AM.
#13
Posted 27 January 2007 - 07:02 AM
<?php //I won't bother using the connect to database stuff since it's only an example //Start the XML echo "<?xml version=\"1.0\" encode=\"UTF-8\"?>"; echo "<firstChild>"; //Selecting from table.. $query = "SELECT * FROM table ORDER BY id DESC"; //Running a while loop to retrieve everything while($row = $mysql_fetch_array($query)) { //Add childNodes echo "<childNode attribute1=\"".$row["row1"]."\" attribute1=\"".$row["row1"]."\" />"; } //Close firstChild echo "</firstChild>"; ?>
Then you'd save that file as maybe getData.php, then you would load it inside the XML object:
var myXML:XML = new XML(); myXML.ignoreWhite = true; ... myXML.load("getData.php");
So you can see how easy it is
Edited by Ben, 27 January 2007 - 07:03 AM.
#14
Posted 27 January 2007 - 09:56 AM
#15
Posted 27 January 2007 - 11:01 AM
Well, to add images, you'd want to lay your XML out like:
<?xml version="1.0"?> <firstChild> <childNode title="Title" image="Image.jpg" /> </firstChild>Then use the loadMovie() method to load the image into an empty movieclip:_root.createEmptyMovieClip("imageHold", getNextHighestDepth()); imageHold.loadMovie(xmlObj.firstChild.childNodes[0].attributes["image"]);
When the person I am making the website for wants to update a News section and type whatever and put an image or two in with that entry, will they have to type up all of that stuff? Or is there a way to get around that? He only really knows HTML like <img src=> and <Br>, and doesn't want to do the updating through me.
Edited by ogrekey, 27 January 2007 - 11:02 AM.
#16
Posted 27 January 2007 - 06:41 PM
Alternatively, I could create a simple something that he'd fill the header and the image field out, and click generate, which would generate the XML for him.
Edited by Ben, 27 January 2007 - 06:42 PM.
#17
Posted 27 January 2007 - 09:28 PM
#18
Posted 27 January 2007 - 11:09 PM
I could do the generator, but not the CMS, since, well, I honestly don't want to Would you like the generator in either Flash or Javascript?
#19
Posted 28 January 2007 - 11:26 AM
Edited by ogrekey, 28 January 2007 - 11:27 AM.
#20
Posted 28 January 2007 - 02:59 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users