Welcome, Guest. Please login or register.
Did you miss your activation email?
02/08/12, 14:21
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Recent Tutorial Support
| |-+  Flash GuestBook Support (Moderators: Flash-db, vesa kortelainen, Ronald Wernecke, Mohsin Sumar, Jorge Solis)
| | |-+  Problems with Guestbook 1
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] 2 Print
Author Topic: Problems with Guestbook 1  (Read 3616 times)
Joachim
Server what's that
*
Posts: 9



View Profile Email
« on: 09/17/09, 14:25 »

I just used the fla and php from Jeffry Hill you can download.
I use a main movie and with the loadmovie command I Import it on stage
this is the movie, click on"gastenboek"
http://www.koffiehuismarianne.be/Villarocktica/ 

the imported movie : http://www.koffiehuismarianne.be/Villarocktica/Guest.swf does work !

when I type http://www.koffiehuismarianne.be/Villarocktica/GuestBook.php : I get this error : &TotalEntries=4&NumLow=&NumHigh=&GuestBook=

Anybody who can help me ?
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14593


View Profile
« Reply #1 on: 09/18/09, 06:11 »

If you access directly the php script whitout any parameter it doesn't output anything, but the first call is something like this: http://www.koffiehuismarianne.be/Villarocktica/GuestBook.php?NumLow=0&NumHigh=10&R=96

Jorge
Logged

Joachim
Server what's that
*
Posts: 9



View Profile Email
« Reply #2 on: 09/18/09, 06:38 »

and what does that mean ?
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #3 on: 09/18/09, 11:15 »

everything is working ok.
You are not meant calling the php script directly without delivering the expected parameters, otherwise it responds in an unexpected way.
Logged

happy flashing
Cool
Ronald
Joachim
Server what's that
*
Posts: 9



View Profile Email
« Reply #4 on: 09/21/09, 15:33 »

Thanks for answering.
But what do I have to do now ?
Logged
Joachim
Server what's that
*
Posts: 9



View Profile Email
« Reply #5 on: 09/21/09, 15:39 »

I have now a main swf with on a certain frame this action : loadMovie("Guest.swf", _root.exband);
stop();

and the guest.swf action :

NumLow = 0;
NumHigh = 10;
loadVariablesNum ("GuestBook.php?NumLow="+NumLow+"&NumHigh="+NumHigh+"&R="+random(999), _this);
stop();

I tried _self too ...




Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #6 on: 09/22/09, 00:00 »

which version of flash are you using?
The gustbook 1 is written for flash 5 - so it needs some modification for running with later versions.

Depending on your server settings, there should be some modifications too.
But all these are allready described in various posts around guestbook 1.
It very much depends on what you got and what you want to do.
The tutorial is not meant to be an application by its own, but rather to show how communication works with file based storage.

If you had a link to check, I'll have a look.

The file seams to be written ok, and the php delivers the content.
So you are propably fetching the result into a wrong place.
Dont use loadVariablesNum anymore - it is far outdated and just delivers the variables into a level.

Rather use the loadVars object for communication.
My Advice for now: look into the loading and saving tutorials, to get the basic idea of handling data.
« Last Edit: 09/22/09, 00:05 by Ronald Wernecke » Logged

happy flashing
Cool
Ronald
Joachim
Server what's that
*
Posts: 9



View Profile Email
« Reply #7 on: 09/22/09, 05:46 »

i use Flash 8...

The only thing I want, is that you can write a text and post it in some kind of list ( like a guestbook). So everybody can read it. But I don't know anything about php and I don't understand it.
So I was thinking that when I just used the guestbook.fla , uploaded the guestbook.php and linked it in my file it would work. But it doesn't , and I don't know why because I don't understand php language...
Logged
Joachim
Server what's that
*
Posts: 9



View Profile Email
« Reply #8 on: 09/22/09, 05:58 »

I have now a main swf, and a movie clip( with instance name : "gigs") with on a certain frame(frame 40) this action : loadMovie("Guest.swf", _root.exband);
stop();
Guest.swf is in the main directory of the php file and the other swf

and the guest.swf action :

NumLow = 0;
NumHigh = 10;
loadVariables("GuestBook.php?NumLow="+NumLow+"&NumHigh="+NumHigh+"&R="+random(999), _self);
stop();


Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #9 on: 09/22/09, 08:39 »

especialy if you are loading the guestbook into another movieclip, use loadVars object to load data.
LoadVariables is old syntax and outdated.
Again - look into the load and save tutorials - there are examples showing you how it works. Or have a look into the helfile for the loadVars object.
Logged

happy flashing
Cool
Ronald
Joachim
Server what's that
*
Posts: 9



View Profile Email
« Reply #10 on: 09/23/09, 02:04 »

I've read something in the helpfile.

if I am loading the vars from a extern swf, it has to be
loadVariablesNum("Guest.php?NumLow="+NumLow+"&NumHigh="+NumHigh+"&R="+random(999), 1);
 right ?

I just don't understand it. It just don't work, and because I don't know a thing about php, I don't find my fault(s)...
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #11 on: 09/23/09, 09:18 »

forget loadvariables and loadvariablesnum.

These are outdated and just confusing.

Use the loadVars object - this is working, no matter where youre movieclip is loaded.

Be aware of the path to the target components.

If your script runs inside the _root level, and you guestbook is loaded into another clip, you have to address it all the way.

If you dont know where you currently are, do
Code:
trace(this);
This will display the path you are in.
Logged

happy flashing
Cool
Ronald
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #12 on: 09/24/09, 06:59 »

Use LoadVars to transport the data.
Put the loadVars object inside of the guest.swf and handle all data there, so you dont have to deal with loading paths.
Code:
var submitListener:Object = new Object();
submitListener.click = function(evt:Object) {
    var result_lv:LoadVars = new LoadVars();
    result_lv.onLoad = function(success:Boolean) {
        if (success) {
            result_ta.text = result_lv.welcomeMessage;
        } else {
            result_ta.text = "Error connecting to server.";
        }
    };
    var send_lv:LoadVars = new LoadVars();
    send_lv.name = name_ti.text;
    send_lv.sendAndLoad("guestbook.php", result_lv, "POST");
};
submit_button.addEventListener("click", submitListener);
LoadVars.sendAndLoad("guestbook.php");
This is the sample from Flash help
You will receive the answer of the server inside of result_lv.
Logged

happy flashing
Cool
Ronald
Joachim
Server what's that
*
Posts: 9



View Profile Email
« Reply #13 on: 09/25/09, 07:42 »

And where do I load the txt file ?

I don't understand it. I quit, it is to difficult for me.
Thanks anyway...
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #14 on: 09/25/09, 09:07 »

which textfile?
the guestbook is loded by the LoadVars object.

This is one of the easyest projects - nothing realy complex.

But programming is not a copy and paste job - the least you have to understand what is happening.
Logged

happy flashing
Cool
Ronald
Pages: [1] 2 Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything