Welcome, Guest
  • Author Topic: THERE IS A GOD!! GUESTBOOK V1 WORKING  (Read 5657 times)

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: THERE IS A GOD!! GUESTBOOK V1 WORKING
    « Reply #15 on: 10/04/10, 15:31 »
    I dont see a section, where you handle the received data.

    This is another reason for switching to a more modern environment.

    Use the LoadVars object, instead of the old loadVariablesNum.

    Then you aill receive a data event, when the server returned them.

    There you can assign them to the values.
    happy flashing
    8)
    Ronald

    maas

    • Server what's that
    • *
    • Posts: 11
    • nothing endures but change...
      • View Profile
    Re: THERE IS A GOD!! GUESTBOOK V1 WORKING
    « Reply #16 on: 10/09/10, 15:07 »
    Hi Ronald

    (his son speaking)

    I implemented the loadvar for my father, but it isn't quite working as I want it to...

    The php adds new entries to the txt file to the top (the flash starts importing after the variable is declared in the .txt)
    Also php renders the entry with html tags flash isn't reading them...

    Is there a way to fix this?
    Should I upload the file for you to take a look at it?

    Cheers,
    Jeroen

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: THERE IS A GOD!! GUESTBOOK V1 WORKING
    « Reply #17 on: 10/09/10, 15:20 »
    first of all, give me a life link
    and print the section where you fetch the onData event.
    happy flashing
    8)
    Ronald

    maas

    • Server what's that
    • *
    • Posts: 11
    • nothing endures but change...
      • View Profile
    Re: THERE IS A GOD!! GUESTBOOK V1 WORKING
    « Reply #18 on: 10/09/10, 15:27 »
    Hi,
    The life link is: http://www.ikbiedzorg.com wait for the menu and select 'Gastenboek'.

    The loadaction is:

    NumLow = 0;
    NumHigh = 10;

    //Make a new loadvars object
    myLoadVars_lv = new LoadVars();
    //when this load vars object FINISHES LOADING something this function is run
    myLoadVars_lv.onLoad = function(success) {
       //the success variable is a parameter, it is true or false, if it is true,
       //that means the file has loaded properly
       if (success) {
          //you can call the variable from the text file using the loadvars object
          myTextBox2_txt.text = this.variable2;
       }
    }
    //AFTER you define the onLoad event handler, then you tell flash to load the file.
    myLoadVars_lv.load("GuestBook.txt");

    Cheers

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: THERE IS A GOD!! GUESTBOOK V1 WORKING
    « Reply #19 on: 10/10/10, 01:08 »
    why this.variable2?
    shouldt it be this.GuestBook?
    happy flashing
    8)
    Ronald

    maas

    • Server what's that
    • *
    • Posts: 11
    • nothing endures but change...
      • View Profile
    Re: THERE IS A GOD!! GUESTBOOK V1 WORKING
    « Reply #20 on: 10/10/10, 10:44 »
    Hi Ronald,
    Jos again, Jeroen is a week in Berlin for school.

    I changed this.variable2 into this.GuestBook
    I get an undefined error.

    So I changed it back and as you can see , the entries are loaded. Not HTML formatted but loaded. I added the last entry after the first one, so there are 2 entries at this time.

    Best Regards,
    Jos
    « Last Edit: 10/10/10, 10:47 by maas »

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: THERE IS A GOD!! GUESTBOOK V1 WORKING
    « Reply #21 on: 10/11/10, 07:38 »
    how the variables are named, depends on, how they are given back from php and how they are defined in the loadVars object.

    If you do the loading and saving tutorials, you will have a deeper look into this technique.
    happy flashing
    8)
    Ronald

    maas

    • Server what's that
    • *
    • Posts: 11
    • nothing endures but change...
      • View Profile
    Re: THERE IS A GOD!! GUESTBOOK V1 WORKING
    « Reply #22 on: 10/20/10, 13:39 »
    Ok , my son fixed it by rewriting the php-script.
    Cheers
    Jos