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 14
  1. #1
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    Ive wrote a stats program for a website and wish to create a flash app that displays the stats, so I can have it sat on the desktop and I or whoever I give the flash players address to can look at the stats.
    Regards Phil,


  2.  

  3. #2
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    4 times
    Wouldn't it be just simpler to get them the url of the stats page? I mean ... why go through all the trouble if it's already created and working on the net?
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  4. #3
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    urmm I see your point but I want to have a little box sat on my desktop that refreshes every 60 seconds or so, rather than opening the stats page and having to login etc
    Regards Phil,


  5. #4
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    4 times
    Wow ... stats-happy are ya :laugh:

    Create a widget then? Like the Yahoo! Widgets.
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  6. #5
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    If the question is about getting the php data into flash, you can have a php page that generates the variables for flash, in a format that flash can read (just find any kind of tutorial on reading text files in flash). Just use "echo" to write the variables, like this:
    echo "&var1=" . $var1 . "&var2=" . $var2... etc. That's what flash will see, when you use loadVars("blah.php") or whatever (you'll need to look up the exact syntax).
    choosy developers choose gif!
    website | paintings | blog

  7. #6
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    karinne what do I need to know to make a widget?

    raspberry do you think I could echo this function another similar

    PHP Code:
    function last5Uniques() {
        
        
    $select "SELECT * FROM visitors ORDER BY date DESC LIMIT 5";
        
    $result mysql_query($select);
        
        echo 
    '            <table>
                    <tr>
                        <th>Date & Time</th>
                        <th>IP Address</th>
                    </tr>'
    ;
        
        while ( 
    $row mysql_fetch_array($result)) {
        
    $date $row['date'];
        
    $ip $row['ip'];
        
    $date date("d/m/y - H:i:s",$date);
    echo <<<end
        <tr>
            <td>
    $date</td>
            <td>
    $ip</td>
        </tr>    
    end;
    // endwhile
    echo '</table>';
        } 
    //end function 
    Regards Phil,


  8. #7
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    Quote Originally Posted by leprechaun13
    raspberry do you think I could echo this function another similar
    I'd say do something like this:

    PHP Code:
       
        $select 
    "SELECT * FROM visitors ORDER BY date DESC LIMIT 5";
        
    $result mysql_query($select);
        
    $i 0// counter
       
        
    while ( $row mysql_fetch_array($result)) {
          
    $date $row['date'];
          
    $ip $row['ip'];
          
    $date date("d/m/y - H:i:s",$date);
          echo 
    "&date$i=" $date;
          echo 
    "&ip$i=" $ip;
          
    $i++;
      } 
    // endwhile 
    Then in flash, read in date0, ip0, date1, ip1, ..., date4, ip4 and that will be your 5 records.
    choosy developers choose gif!
    website | paintings | blog

  9. #8
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    thanks raspberry. will have a look at that in a bit,


    not very good with flash how do I read the variables?

    sorted found this tutorial getting basic output in flash time to get a bt complex
    Regards Phil,


  10. #9
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    4 times
    Quote Originally Posted by leprechaun13
    karinne what do I need to know to make a widget?
    Never did one ... but got this from the Yahoo! Widget page

    http://widgets.yahoo.com/workshop/
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  11. #10
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    yea found that... their documentation isnt very good and I couldnt do what I wanted.

    Gone for flash works a charm
    Regards Phil,



Page 1 of 2 1 2 LastLast

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 10:06 AM.
Powered by vBulletin® Version 4.2.0
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com