I just log in here today and found this guest book tutorial. I would say this guestbook is really cool and what I’m looking for. Thanks Flashmatazz
Still I have couple of questions about this guestbook. first, I saw the swf file of the guestbook is about 60kb, I just wondering what make it too big (I mean it’s only contain a few box,button and text right,I think 60kb too big for that)…is there a way to ‘shrink’ the number (at least 20kb or less) ?
second question is, after the swf is load, it load the guestbook.xml content, I have put alot of entries for testing and it would take a while loading them (I’m using dial-up)…is there a way so I could put a percentage preloader or may be a text like ‘loading…’ to tell the viewer the content is being load?
Anyway…It’s a really really nice scripts (I think I could eleborate the function to do many thing else too)
// **** Load XML ****************************
//Put a play movie in here..... it will start playing just as the request is made to load the XML data
myXML = new XML();
myXML.ignoreWhite = true;
receiverXML = new XML();
myXML.onLoad = function(success){
myXML.contentType = "text/xml";
if (success){
this.showXML();
//Put stop/unload movie here once you know the XML file has been loaded.
}
else{
trace("Error loading XML file");
//You could tell a movie to play here saying that there has been a error if you wanted.
}
}
"; [color=red]myGuestbook.htmlText += this.firstChild.childNodes.firstChild.firstChild.nodeValue + “
”;[/color] [color=#ff0000][/color]
[color=red][color=#000000]And honestly, I don’t really know how to solve this.[/color][/color]
[color=red][color=#000000]Anybody could help me on this ?[/color][/color]
[color=red][color=#000000][/color][/color]
[color=red][color=#000000]Thanks in advance…[/color]
We in the same boat Vulcan, I know nothing about XML too (just start to learn about it since this guestbook) I really really hope Flashmatazz could come up to solve this…
Ok, instead of using a new textnode, just use a new attribute.
assuming you’ve created an input textfield called myEmail, within the sendButton.onRelease handler:
var myName = this._parent.nameField.text;
var myMessage = this._parent.messageField.text;
// emailfield
var myEmail = this._parent.emailField.text;
// etc.
However, since we already have a node called ‘entry’ it’s a bit simpler to create an attribute for it to contain the email address, in the same way the ‘name’ attribute is created.
Thank you very much Flashmatazz, that’s help a lot though I guess I’ve to learn XML from zero…I heard we could save/load images inside flash using XML…do you know any good tutorial on this one ?
Sorry to bother about this again Flashmatazz but regarding my earlier question, is any way to reduce the size of this guest book, In my server it’s indicate the swf file is more than 60kb, I wish to reduce it to at least half of it (30+kb is good enough)
add up to rinaazlin question, can it display ‘loading text’ first before it load XML. The_vulcan’s idea is great, but can it be done in other way? like put some text in flash AS.
Neo-Geo.
you can easily type a text like ‘loading…’ or something inside the text field in the flash file. Just like that and the loaded guestbook.xml content will overwrite it. Off course vulcan suggest would be good too…
Is there any set-up with php and xml on my server before i try it? I can’t seem to get it working. I have the html, php, xml, and the swf on my sever and they dont respond.