Jump to content

Search the Community

Showing results for tags 'high score flash php'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. hello,I'm in need of getting my high score to work in my game.It won't load the high scores and it wont post the scores :SThis code is from: get_score2.php<?php$db=mysql_connect("loff-production.com.mysql", "loff_production", "Mypassword");mysql_select_db("high_scores", $db);$scores = '';$name = '';$query = "select * from high_scores order by score DESC LIMIT 0,10";$result=mysql_query($query);$i = 0;while($row=mysql_fetch_array($result)){$name .= 'name'.$i.'='.urlencode($row['name']).'&';$scores .= 'score'.$i.'='.urlencode($row['score']).'&';$i++;}echo $scores;echo $name;?>This code is from register.php:<?php$db=mysql_connect("loff-production.com.mysql", "loff_production", "Mypassword");mysql_select_db("high_scores", $db);$sql = 'INSERT INTO high_scores (name,score) VALUES ("'.$_POST['name'].'","'.$_POST['score'].'")';$result = mysql_query ($sql);if ($result) {$created = 'score posted for ' .$_POST ['name'];echo 'message='.urlencode($created);}?>This code is from One of the frames in my flash file:stop();var lowHighScore = 0;myData = new LoadVars();myData.load("get_score2.php");myData.onLoad = function(success){if(success){for(var i=0; i<10; i++){_root["n"+i].text = this['name'+i];_root["s"+i].text = this['score'+i];if(i==9){lowHighScore = s9.text;}}}else{trace("Error loading data!");}}This code is from another frame in my flash file:stop();if(score_txt.text > lowHighScore){message_txt.text = "Congratulations! Submit your initials and high score..."}else{message_txt.text = "You did not get a high score, please try again!";}player = new LoadVars();playerRegistered = new LoadVars();playerRegistered.onLoad = showResult;submit_btn.onRelease = submitScore;function submitScore():Void {player.name = name_txt.text;player.score = score_txt.text;player.sendAndLoad("register.php",playerRegistered);}function showResult():Void {message_txt.text = this.error;message_txt.text = this.message;name_txt.text = "";score_txt.text = "";_root.play();} Quote MultiQuote Edit Report
×
×
  • Create New...