User Tag List

Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 32

Thread: Counting button taps

  1. #21
    Clicker Multimedia Fusion 2iOS Export Module

    Join Date
    Apr 2009
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you own a web domain or are you using any web hosting?

    They typically give you access to your own SQL databases, which you can use. Then you use PHP to insert data and retrieve data into this database.

  2. #22
    Clicker Multimedia Fusion 2iOS Export ModuleSWF Export Module

    Join Date
    May 2008
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I mean I don't know what code to use and how to modify it to work for what I want. I do have web hosting and a domain name.

  3. #23
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Sep 2011
    Location
    Germany
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey JosephFTaylor,
    I have adapted your PHP code so you only have to replace some variables as you can read in my comments within the code... I hope that I made no mistakes cause I havenīt tested it yet

    PHP Code:
    <?php
    if (isset($_GET["connect"]) && $_GET["connect"]==true)
        {
        echo 
    "online";
        exit;
        }

    if (isset(
    $_GET["add"]) && $_GET["add"]==true)
        {
        
    mysql_connect("localhost""username","password") or die ("connection failed."); 
        
    /*Replace 'localhost', 'username' and password' with your db login data*/
        
    mysql_select_db("database") or die ("database does not exist.");
        
    $sqlselect=mysql_query("SELECT * FROM your_table");
         
    /*Replace 'your_table' with your table :) in the database (for example 'counter_table')*/
        
    $my_array=mysql_fetch_array($sqlselect);    
        
    $count=$my_array['column'];
        
    /*Replace 'column' for example with 'counter'
         but then 'counter' has to exist within your table as a column*/
        
    $new_count $count 1;
        
    $sqlupdate=mysql_query("UPDATE your_table SET column = $new_count")
         
    /*Replace variables in the line above as you did before*/
        
    mysql_close(); 
        echo 
    $new_count;
        }

    if (isset(
    $_GET["subtract"]) && $_GET["subtract"]==true)
        {
        
    mysql_connect("localhost""username","password") or die ("connection failed."); 
         
    /*Replace 'localhost', 'username' and password' with your db login data*/
        
    mysql_select_db("database") or die ("database does not exist.");
        
    $sqlselect=mysql_query("SELECT * FROM your_table");
         
    /*Replace 'your_table' with your table :) in the database (for example 'counter_table')*/
        
    $my_array=mysql_fetch_array($sqlselect);    
        
    $count=$my_array['column'];
         
    /*Replace 'column' for example with 'counter'
         but then 'counter' has to exist within your table as a column*/
        
    $new_count $count 1;
        
    $sqlupdate=mysql_query("UPDATE your_table SET column = $new_count")
         
    /*Replace variables in the line above as you did before*/
        
    mysql_close(); 
        echo 
    $new_count;
        }
    ?>

  4. #24
    Clicker Multimedia Fusion 2iOS Export ModuleSWF Export Module

    Join Date
    May 2008
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, so I've made the modifications. My domain name is josephftaylor.com would I just replace localhost with that? On another note, it's not working. It's not echoing 'online' when I request 'connect'.

  5. #25
    Clicker Multimedia Fusion 2iOS Export Module

    Join Date
    Apr 2009
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by JosephFTaylor View Post
    Okay, so I've made the modifications. My domain name is josephftaylor.com would I just replace localhost with that? On another note, it's not working. It's not echoing 'online' when I request 'connect'.
    Have you made sure you have the "http://" at the start of your get URL event in MMF2?

    Also, most people generally just use localhost for the connection, so you can just leave that.

  6. #26
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Sep 2011
    Location
    Germany
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry i made two little mistakes... i forgot ";" in two lines
    The code below should work now.

    PHP Code:
    <?php
    if (isset($_GET["connect"]) && $_GET["connect"]==true)
        {
        echo 
    "online";
        exit;
        }

    if (isset(
    $_GET["add"]) && $_GET["add"]==true)
        {
        
    mysql_connect("localhost""username","password") or die ("connection failed."); 
        
    /*Replace 'localhost', 'username' and password' with your db login data*/
        
    mysql_select_db("database") or die ("database does not exist.");
        
    $sqlselect=mysql_query("SELECT * FROM your_table");
         
    /*Replace 'your_table' with your table :) in the database (for example 'counter_table')*/
        
    $my_array=mysql_fetch_array($sqlselect);    
        
    $count=$my_array['column'];
        
    /*Replace 'column' for example with 'counter'
         but then 'counter' has to exist within your table as a column*/
        
    $new_count $count 1;
        
    $sqlupdate=mysql_query("UPDATE your_table SET column = $new_count");
         
    /*Replace variables in the line above as you did before*/
        
    mysql_close(); 
        echo 
    $new_count;
        }

    if (isset(
    $_GET["subtract"]) && $_GET["subtract"]==true)
        {
        
    mysql_connect("localhost""username","password") or die ("connection failed."); 
         
    /*Replace 'localhost', 'username' and password' with your db login data*/
        
    mysql_select_db("database") or die ("database does not exist.");
        
    $sqlselect=mysql_query("SELECT * FROM your_table");
         
    /*Replace 'your_table' with your table :) in the database (for example 'counter_table')*/
        
    $my_array=mysql_fetch_array($sqlselect);    
        
    $count=$my_array['column'];
         
    /*Replace 'column' for example with 'counter'
         but then 'counter' has to exist within your table as a column*/
        
    $new_count $count 1;
        
    $sqlupdate=mysql_query("UPDATE your_table SET column = $new_count");
         
    /*Replace variables in the line above as you did before*/
        
    mysql_close(); 
        echo 
    $new_count;
        }
    ?>
    The request should be as the following to get "online" back: "http://www.your-site.com/index-or-something-else.php?online=true"

  7. #27
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,057
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Hi Atrox! Sorry to bump, but did you have got time to take a look at Facebook?

    If the user login within the app, we could share that the user is playing the game now! invite friends, show which other friends are playing the game,....

  8. #28
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Sep 2011
    Location
    Germany
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey StingRay,
    i havenīt found something that you were looking for (with the GET object) cause i donīt know anything about facebook and its interface...
    But maybe this link will be helpful for you: https://developers.facebook.com/docs/mobile/ios/build/
    But this would require manual coding in objective-C and on the weekend i will search again cause i had not enough time in the past to search for something that I have not been confronted with before.
    (Hope you understand what i am trying to say, my english isnīt the best )

  9. #29
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,057
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Hi! I've found an interesting link, Thats maybe useful: http://thinkdiff.net/facebook/php-sd...nect-tutorial/

    http://net.tutsplus.com/tutorials/ph...ebook-connect/

    What do you think?!?

  10. #30
    Clicker Multimedia Fusion 2iOS Export ModuleSWF Export Module

    Join Date
    May 2008
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No I've got it so the buttons work and it comes back with online, but when I press the buttons it doesn't add, it only comes back with 1 and -1

Page 3 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. Button is clicked condition works even when button disabled - Beta9
    By AyreGuitar in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 29th May 2012, 02:29 PM
  2. Do you start counting from zero or one?
    By Grim_Jester in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 6th April 2012, 04:30 PM
  3. counting objects of a certain value?
    By Bigfoot in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 1st February 2012, 07:32 PM
  4. Counting Fun
    By Jakinbandw in forum File Archive
    Replies: 3
    Last Post: 17th January 2009, 12:05 AM
  5. Counting how many...
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 17th October 2006, 09:36 AM

Posting Permissions

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