Ok,
problem was with "<" and ">" characters.
I added a control and they are not allowed.
Re- download the files or do the following:
change Main.as with the following:
Code:
/*
*************************************
Flash CS3 Simple Guestbook
http://www.flepstudio.org
© Author: Filippo Lughi
version 1.0
*************************************
*/
package org.FlepStudio
{
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
import flash.net.*;
import caurina.transitions.Tweener;
public class Main extends MovieClip
{
private var file_xml:LoadingXML;
public var messages_array:Array;
private var timer:Timer;
private var trick_mc:MovieClip;
private var apple_mc:Apple;
private var boo:Boolean=true;
public function Main()
{
addEventListener(Event.ADDED_TO_STAGE,init);
}
private function init(evt:Event):void
{
removeEventListener(Event.ADDED_TO_STAGE,init);
initMenu();
stage.frameRate=31;
area_txt.editable=false;
form_mc.name_txt.border=true;
form_mc.name_txt.borderColor=0x999999;
form_mc.name_txt.background=true;
form_mc.name_txt.backgroundColor=0x999999;
form_mc.name_txt.textColor=0xFFFFFF;
form_mc.mess_txt.border=true;
form_mc.mess_txt.borderColor=0x999999;
form_mc.mess_txt.background=true;
form_mc.mess_txt.backgroundColor=0x999999;
form_mc.mess_txt.textColor=0xFFFFFF;
loadXML();
}
private function loadXML():void
{
file_xml=new LoadingXML(this);
}
public function displayMessages():void
{
messages_array.reverse();
displayText();
addButtonListener();
}
private function displayText():void
{
var final:String="";
for(var i:int=0;i'+""+messages_array[i].date+""+
""+"\n"+""+''+messages_array[i].name+""+
""+''+" says :"+""+"\n"+
''+messages_array[i].mess+""+"\n\n";
}
area_txt.htmlText=final;
}
private function addButtonListener():void
{
form_mc.send_mc.mouseChildren=false;
form_mc.send_mc.buttonMode=true;
form_mc.send_mc.addEventListener(MouseEvent.MOUSE_DOWN,checkFields);
}
private function checkFields(evt:MouseEvent):void
{
if(form_mc.name_txt.text!="")
{
if(form_mc.mess_txt.text!="")
{
sendMessage();
}
else
{
noMessage();
removeError();
}
}
else
{
noName();
removeError();
}
}
private function removeError():void
{
timer=new Timer(2000,1);
timer.addEventListener(TimerEvent.TIMER,resetErrorField);
timer.start();
}
private function resetErrorField(evt:TimerEvent):void
{
form_mc.error_txt.text="";
boo=true;
}
private function noString():void
{
form_mc.error_txt.text=">< NOT SUPPORTED";
}
private function noName():void
{
form_mc.error_txt.text="UNDEFINED NAME";
}
private function noMessage():void
{
form_mc.error_txt.text="UNDEFINED MESSAGE";
}
private function sendMessage():void
{
var s:String=form_mc.mess_txt.text;
for(var j:int=0;j")
{
boo=false;
noString();
removeError();
break;
}
}
if(boo)
{
onSending();
var message_sender:SendMessage=new SendMessage(this);
}
}
private function onSending():void
{
trick_mc=new MovieClip();
trick_mc.alpha=0;
trick_mc.graphics.beginFill(0xFFFFFF,1);
trick_mc.graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight);
addChild(trick_mc);
Tweener.addTween(trick_mc,{alpha:0.8,time:0.4,transition:"linear"});
apple_mc=new Apple();
apple_mc.width=40;
apple_mc.height=40;
apple_mc.alpha=0.7;
apple_mc.x=stage.stageWidth/2-apple_mc.width/2;
apple_mc.y=stage.stageHeight/2-apple_mc.height/2;
addChild(apple_mc);
}
public function successSending():void
{
apple_mc.stop();
removeChild(apple_mc);
Tweener.addTween(trick_mc,{alpha:0,time:0.4,transition:"linear",onComplete:removeTrick});
}
private function removeTrick():void
{
refresh();
removeChild(trick_mc);
}
public function refresh():void
{
messages_array=new Array();
area_txt.text="";
form_mc.name_txt.text="";
form_mc.mess_txt.text="";
loadXML();
}
public function initMenu():void
{
var etichetta:String='Flash CS3 GuestBook';
var cm:ContextMenu=new ContextMenu();
var item:ContextMenuItem=new ContextMenuItem(etichetta);
cm.hideBuiltInItems();
cm.customItems.push(item);
item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,itemHandler1);
this.contextMenu=cm;
}
private function itemHandler1(event:ContextMenuEvent):void
{
var url:String='http://www.flepstudio.org/';
var request:URLRequest=new URLRequest(url);
navigateToURL(request,'_parent');
}
}
}
Re-create the SWF.
Change getMessages.php with the following:
PHP Code:
<?php
/*
*************************************
Flash CS3 Simple Guestbook
http://www.flepstudio.org
Author: Filippo Lughi
version 1.0
*************************************
*/
include('configuration.php');
$mysql = mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname);
$Query="SELECT * from simple_guestbook";
$Result=mysql_query( $Query );
$Return="<?xml version=".'"1.0"'." encoding=".'"UTF-8"?>'."\n"."<items>";
while($item=mysql_fetch_object($Result))
{
$Return.="<item><id>".$item->ID."</id><name>".$item->name."</name><message>"."<![CDATA[".$item->message."]]>"."</message><date>".$item->date."</date></item>";
}
$Return.="</items>";
mysql_free_result($Result);
echo ($Return)
?>