A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: sending an if statement back to flash

  1. #1
    Owned By Code
    Join Date
    Feb 2001
    Posts
    151
    Here is the code I'm using so far:

    (it's PHP)
    Code:
    function privateMessages()
    {
    //call the query to check for messages based on the username
    $query = "SELECT sentBy FROM forumPrivate WHERE newMessage = 0 AND sentTo = '$userdetails[0]'";
    
    if(!mysql_query($query)) {
        fail("embeding new features... Please stand by..");
    }
    
    if ($result && @mysql_num_rows($result) > 0)
    {
    // Output the status back to Flash
        print "&private=yes";
    }
    }
    so what I'm seeing is if there are any messages with a flag of 0, and if so send the var to flash...

    Well i can't get flah to pick it up... it's getting so fustrating... I'm not sure what's up... I have everything working in Flash because if I do a name.swf?private=yes it works...

    Thanks for the help

  2. #2
    Hmm, how are you calling this function? I'm an ASP guy, but I have lots of experience getting variables and status reports from a database, as that's what my chat program on our website is all about.

    are you using LoadVariables?

    If so, you may have a Cache problem, and you should send a random number variable along with your traditional variables to your file

    cheers,

    chris
    http://www.opacitydesigngroup.com

  3. #3
    Owned By Code
    Join Date
    Feb 2001
    Posts
    151
    Hey Chris,

    Thanks for the quick note...

    Basically what I'm doing is setting up a function that gets called each time a new script is called (it's with one of my included PHP scripts) so the scripts that are called using loadVaribles are all called with a random number.

    I have a loop in my flash movie that check it every 24 seconds. by doing a _root.private = "yes" blah blah

    I think I'm just going to have to write out a checker script.. this is too much of a nightmare!

    Thanks for your help though!

    Cheers,

    Scott

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center