Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Member
    Join Date
    Aug 2004
    Posts
    61
    Member #
    7339
    i m just familiarising with this matter, and tried a test, but it failed.

    I have a SWF with a movieclip. this action belongs to the movieclip:

    Code:
    onClipEvent (load) {
        loadVariables("http://www.killerwhale.be/testing/database.php", this, "GET");
    }
    in this movieclip i have a dynamic textfield with in the var field in the props page typed: naam

    then i have database.php with the following script:

    Code:
    <?php
    $x = "abc";
    print "naam=$x";
    ?>
    When i load the SWF in a HTML file, the "abc" is not showing up in the textfield in the SWF.
    http://www.killerwhale.be/testing/database.html

    What am i doing wrong?

    tia,

  2.  

  3. #2
    Junior Member
    Join Date
    Jul 2004
    Posts
    10
    Member #
    6917
    im not sure, but try this:

    onClipEvent (load) {
    loadVariablesNum("http://www.killerwhale.be/testing/database.php", 0, "GET");
    }

    safe bruv

  4. #3
    Member
    Join Date
    Aug 2004
    Posts
    61
    Member #
    7339
    sorry, still wont work :-(

  5. #4
    Member
    Join Date
    Aug 2004
    Posts
    61
    Member #
    7339
    anyone please?

  6. #5
    Member
    Join Date
    Aug 2004
    Posts
    61
    Member #
    7339
    ok found it

  7. #6
    Member FrogOnTop's Avatar
    Join Date
    Jul 2004
    Posts
    50
    Member #
    6635
    You need to format your code properly so flash will read the variables.

    Your php must have these "&" before and after the output string.

    For example if you were loading "variables.php", variables.php must output something along the lines of &variable1=Turtle&variable2=Goat&

    That should fix it.
    Visit me at www.frogontop.com

  8. #7
    Member
    Join Date
    Aug 2004
    Posts
    61
    Member #
    7339
    now that you mention it:
    &variable1=Turtle&variable2=Goat&

    how do i get them into flash?
    I manage to read Turtle into a textbox in flash
    but how can i get flash to read "Turtle Goat"?
    And what about multiple rows in the mysql table?

    thanks!

  9. #8
    Member FrogOnTop's Avatar
    Join Date
    Jul 2004
    Posts
    50
    Member #
    6635
    Quote Originally Posted by killerwhale65
    now that you mention it:
    &variable1=Turtle&variable2=Goat&

    how do i get them into flash?
    I manage to read Turtle into a textbox in flash
    but how can i get flash to read "Turtle Goat"?
    And what about multiple rows in the mysql table?

    thanks!
    Well this is where it gets tricky:
    let's say you wanted (for simplicty sakes)to display two rows of data from a php file.
    Your php file must contain the following data, and in this format:

    variable1 , variable 2 and total records:
    So, your php would output this:

    &variable1=turtle&variable2=goat&totalRecords=2 &

    if you have more than two variables your php would look like this:

    &variable1=turtle&variable2=goat&variable3=fish&to talRecords=3&

    so on and so forth:

    Then you create a simple movie clip named "row". In that movie clip you have a text field. Then what you need to do is using the totalRecords variable you brought into flash, use the good old duplicateMoviieclip function and in a loop where the amount of times looping is equal to the totalrecords, create the isntances on the stage.

    Other things you will need to do is create it so variable changes each time the loop condition is met to add to the end so the text field reads variable in order from 1 to the total, something like this:

    x=x-13;
    ref = this;
    for( var i=0; i<totalSections; i++){
    x=x+13
    duplicateMovieClip ("listbutton", "listbutton"+i, i);
    ref["listbutton"+i].display = this["section"+i];
    setProperty("listbutton"+i, _y, x);
    setProperty("listbutton"+i, _alpha, 100);

    }
    stop ();

    the other thing is you will need to specify where your newly created movie clip will appear, if it is a row you will want to place it the height of a row below the first, hence the:
    setProperty("listbutton"+i, _y, x);
    statement.

    This page: http://www.frogontop.com/portfolio.php
    uses flash and php/mySQL for a portfolio section.

    I hope this has given you some direction...
    Visit me at www.frogontop.com

  10. #9
    Member
    Join Date
    Aug 2004
    Posts
    61
    Member #
    7339
    thank you very much for this explanation. I will try this out and let you know if it works!

  11. #10
    Member
    Join Date
    Aug 2004
    Posts
    61
    Member #
    7339
    ok i found a way to do it!
    Its totally different then what you said, but it does what i want it to do; probably will have some disadvantages also for whatever reason but it does it for now.
    check it out here: http://www.killerwhale.be/testing/database.html
    + the code at: http://www.killerwhale.be/testing/database.php


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:45 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com