ActionScript 1/2 :: Comparing 10 Variables And Listing Top 3 On Scoreboard

Mar 22, 2010

I am making a scoreboard. On this scoreboard I will have 10 different scores. I want to compare the 10 scores and list the top 3 scores in another location. I was thinking at first
if(score1>score2&&score1>score3&&score1>score4 etc.....){
some function
}
But this will only give me the top score in the group. I would like to find the top 3 scores, and then list them.

View 4 Replies


Similar Posts:


ActionScript 1/2 :: Listing All The Populated Variables When A Swf Is Loaded From An Embed Tag?

Mar 9, 2009

I've been wondering how I could possibily do this for some time now. and all I tried or thought of went nowhere. I'd like to list all the variables an html embed tag passes on to the swf file called, whatever they are named and how many there is. <EMBED src="example.swf?var="varcontent",var2="var2content"> it's not life-threatening, but I hate using things that work when I have an idea for things that would work better x)

View 2 Replies

ActionScript 1/2 :: Comparing Two Variables With If Statements

Jan 11, 2010

I'm working with 2 global variables and I need to compare them on 6 different button function clicks for a lot of different scenarios.[code]My function is starting to look like this;[code]only problem i see is that there are many different scenarios and this if statement could get very long. Is there a way to combine it somehow so there wouldn't be that many else if's?

View 3 Replies

ActionScript 2.0 :: Comparing Two Variables For Login?

Jan 16, 2003

For login I need to compare two variables. One of the variables (passw) is loaded dynamically. The other one (pw) is set by a form the user hast to fill. I wrote the following code on a button in the frame where the user hast to type his password (passw is already loaded from a textfile):

on (release) {
if (pw == passw) {
gotoAndStop(4);
} else {
gotoAndStop(3);
}}

In frame 3 I wrote: "wrong password", code is stop ()
In frame 4: "welcome user", code is stop()
I tried half an hour to fix that but I always get "wrong password".
One more question: is a movie loaded with loadMovie(...) able to work with variables set in the main movie (in which I loaded it)?

View 3 Replies

ActionScript 2.0 :: Comparing Values From XML To Variables In Flash?

Dec 8, 2009

I've got an xml file that contains some data (which will be created by an external file later on in the project) and i want to be able to check the data in that XML file against a variable stored in flash.

If the value in the XML is equal to or greater than the value in the variable i want to jump to a different frame. If the xml value is less that the variable value i want it to stop and tell the user a message. i've included my code below. I just cant get it to work. Regardless of if the value in the XML file is higer or lower than the variable in flash, it always continues to the final frame instead of stopping accordingly.

ActionScript

Code:
//Load xml file that contains amount of cash user has and populate cash_txt box with amount
function loadXML(loaded) {

[Code]....

View 1 Replies

ActionScript 3.0 :: Comparing Array Variables And Combine?

Aug 7, 2011

I'm trying to compare two array variables and combine if they do. This is what I have in mind: (it's inside a "for")

Code:
var people:String;
if (arr[i + 1][0]==arr[i][0]){
people = arr[i + 1][6]+", "+arr[i][6];

[code]....

The "i + 1" obviously do not work.

View 9 Replies

ActionScript 2.0 :: Comparing Variables Inside Functions To?

Jul 29, 2007

var q4:Boolean = false; //Will have thirty-eight of these, q4-q41

function noRepeat() {
if (q(_root._currentframe) == true) {
gotoAndStop(randRange(4, 41));
} else if ((q(_root._currentframe)) == false) {
q(_root._currentframe) = true;
}
}

Now, my problem is the bits in red (yes, I know they don't work, that was just the best way I could think to describe what I wanted).

If I create a string that says "q4" then I find it won't compare that to the boolean variable, but I'm positive there must be a better way than putting one of these on every frame.

View 2 Replies

ActionScript 3.0 :: Refresh The Php Scoreboard?

Dec 3, 2010

I have a scoreboard in flash which works great, but once go back onto the scores page at the end of the game it adds the text to each field again rather than refreshing the scores/names, therefore each item appears twice in each  box..
 
Is there a correct way to dynamically update  the scores each time I access the page ? I've tried creating a loop that sets the value of each text_box.text to ""; once I leave the page but that didn't work !!

View 3 Replies

ActionScript 3.0 :: Make A Scoreboard?

Jun 11, 2011

how can i make a scoreboard? i have no idea how to do it

View 1 Replies

IDE :: Completely Dynamic ScoreBoard?

Feb 22, 2010

I'm building a dynamic scoreboard for a client currently. The first application will be a golf leaderboard. It needs to be updateable by the client (I'll write a form that fills in the xml file from the users input)I need to have a xml file that defines..-number of columns/rows-titles-content in each boxand then the flash that takes that and generates a table from it.Is there any tutorials or source files floating around that do this? There's plenty that talk about in-game scoreboards, but we need to have all the data input from an external file.

View 1 Replies

Actionscript 3.0 :: MySQL And PHP To Make A Scoreboard?

May 29, 2009

I need to create a scoreboard for my game. I want to be able to let my user submit the time it took to complete the game to my scoreboard. I have been able to purchase webspace with SQL, PHP. I have set up my SQL database. I have found a great tutorial about how to do precisely what I wanted on YouTube BUT after starting the tutorial I realised it was ActionScript 2, I REALLY need time type of tutorial but for ACTIONSCRIPT.

View 1 Replies

ActionScript 2.0 :: Make A Scoreboard Of Players?

Jul 31, 2010

I'm trying to make a scoreboard of players.It works fine for strings (like the username) listing like:

User1
User2
User3
etc

using in PHP to seperate them. (Using Flash,PHP,MySQL Integration)This is how I get them from the db in PHP:

PHP Code:

while($row = mysql_fetch_array($result)){ $rankPos .= $nrow . "
"; //# Position $rankUser .= $row['user'] . "
"; //Username obviously $rankN .= $row[$rankBy] . "

[code]...

The problem with this is, when flash receives rankings such as time, they are seperated by newlines () which makes them strings instead of integers as they rightly should be.

I'm using a time to string function to convert the time as integer (getTimer()) to a format HH:MM:SS It's fine ranking the times in the getTimer format but it all becomes a mess when trying to display the string format instead. (Considering times for all players are linked in the same string passed by PHP as time

time
time
time (000000

[code]...

The reason they are split with newlines is because the rankings are displayed in a single dynamic text.I tried converting each time in flash using the int function, but what would you do for newlines? The time rankings just comes out as '0' because of the newlines.I've also tried using this following function to remove the newlines and then possibly put each time into an array.

Actionscript Code:
function time(input){ timestr = ""; for(i=0; i<input.length; i++){  if(input.charAt(i) != " "){ timestr += input.charAt(i);} }  return timestr;}

[code]...

What would I check for in order to get each time into an array?Though I'd much prefer using a much more efficient and easy method for display high scores.

View 3 Replies

ActionScript 2.0 :: Scoreboard With Shared Objects?

Sep 7, 2010

I've done this flash scoreboard with shared objects.but what i can done is it will replace the 1st score in my scoreboard, it won't have 2nd, 3rd, 4th and etc...the script i used is:

ActionScript Code:
submit_btn.onPress = function()
{

[code].......

View 0 Replies

ActionScript 2.0 :: Encrypt Data On A Scoreboard?

Oct 17, 2011

Basically I've set up a scoreboard for a flash game I've made for a client. Now the scoreboard works fine but apparently it's not very secure. One of the clients friends was able to add a score of 100,000 without even playing the game. This is quite a big problem as they are planning on doing a competition with prizes for the highest scores.

What's the normal way to encrypt data on a scoreboard? The scores are stored in a MySQL database btw.

View 1 Replies

Actionscript 3.0 :: MySQL And PHP To Make A Scoreboard

Sep 4, 2011

I need to create a scoreboard for my game. I want to be able to let my user submit the time it took to complete the game to my scoreboard. I have been able to purchase webspace with SQL, PHP. I have set up my SQL database. I have found a great tutorial about how to do precisely what I wanted on YouTube BUT after starting the tutorial I realised it was ActionScript 2, I REALLY need time type of tutorial but for ACTIONSCRIPT. I have searched google for over two weeks now, but cannot find anything that suits.

View 1 Replies

ActionScript 2.0 :: Flash 8 - Scoreboard With Shared Objects

Sep 2, 2010

I've done this flash scoreboard with shared objects. But what I can done is it will replace the 1st score in my scoreboard, it won't have 2nd, 3rd, 4th and etc...

The script I used is:
submit_btn.onPress = function(){
//create a new sharedObject called 'userName'
var mySharedObject:SharedObject = SharedObject.getLocal("userName");
var mySharedObject2:SharedObject = SharedObject.getLocal("userScore");
//assign (data) the sharedObject (mySharedObject) a var called 'name1', which has the value of whatever is in textField 'save_txt'
[Code] .....

I want to have each higher score goes to the scoreboard, so will have 10 highest score in my scoreboard. Here is my attached file in CS5 format.

View 4 Replies

ActionScript 1/2 :: Creating An External Array For A Scoreboard?

Jul 26, 2010

I also want another fla file to be able to reference this external array and pull the top 15 scores from it, and then display those scores on a scrolling banner.  I want the banner to be able to update dynamically (I assume reloading the banner fla each time it reaches the end of its cycle, having the first frame load the external array on an onClipEvent action would accomplish this), that way it will update while remaining open.  The main reason I need two separate files for the quiz and the score banner is they will be displayed on two different monitors.  What would be the most efficient way of accomplishing this?  I know a little about actionscript but I don't have much experience with calling data and functions from external fla or as files (the array and the function designating how the data will be arranged within said array are going to be in a separate .as file).

View 9 Replies

ActionScript 2.0 :: Setup A Scoreboard Type Deal

May 10, 2009

Im trying to setup a scoreboard type deal. I'm using SharedObjects.I can make it WRITE to the .sol without any problems but I cant seem to make it READ from the .sol to re-display the data once the user opens the swf again.

View 2 Replies

Flash :: Make A Live Gameshow Scoreboard/timer?

Nov 17, 2009

I need to make a scoreboard/timer that would show on a projector so that everyone can see the current points and the 8 second timer, all this controlled for a non-flash-user, considering someone else will have to do it cause I'm IN the gameshow, so it has to be easily-changable.
 
[[[I'd also like to mention I apparently heard that this could somehow be done sending information between flash and excel? The image attached is what it'd look like. Each peice is a graphic object in flash.

[Code]...

View 1 Replies

ActionScript 3.0 :: Create A Scoreboard For My IPhone Using Flash CS5 In Air For IOS Mode?

Aug 4, 2011

I need this for a simple iPhone app...I was trying to create a Scoreboard for my iPhone using Flash CS5 in Air  for iOS mode. I succesfully add the Timer and the 24-seconds Timer, but  now i need soooo much help. Problems: 1. When the Timer reaches 0 mins, it display only :59, not 00:59 2. I tried to add a Button for the Counter of the points, but it seems  very complicated in AS3(not in AS2 :/). I created a TLF Read Only Text  named "HomeScore" . But it's a String not a Number so i can't add a  simple counter. 4. with the Reset button (for Timer & 24-Seconds) and the Start/Stop buttons (for Timer & 24). My code:import flash.events.MouseEvent;

[Code]...

View 4 Replies

ActionScript 2.0 :: Game Scoreboard Using Local Shared Object?

Oct 10, 2003

I would like to know how to save more than 1 score into the text file and not overwriting the previous score so that it can be displayed in the high score list...I'm not sure how to write the array and where to write itwrite a sample code of for example getting 3 scores, saving it and displaying it in the high score board ?

View 2 Replies

Professional :: Listing A Subdir's Contents?

Nov 9, 2010

how to change the following code so that I get a listing of files in a folder called 'tester' that resides in thedocumentsDirectory?
var directory:File =

File.documentsDirectory;directory.getDirectoryListingAsync();directory.addEventListener(FileListEvent.DIRECTORY_LISTING, directoryListingHandler);function directoryListingHandler(event:FileListEvent):void { var list:Array = event.files; for (var i:uint = 0;[code].....

View 1 Replies

As3 :: Flash - Listing Files In A Folder?

Aug 10, 2010

I want to get a list images inside a folder but in order to do that, I need to get the names all the files inside a folder first. What flash class should I look into to allow me to do this?

EDIT:how about doing this using php? what should I return/echo on my php file?

View 3 Replies

Actionscript 3 :: Listing References Of An Object?

Mar 8, 2012

Does anyone know if it's possible to list the references an object currently has in ActionScript3 (e.g. listeners, children etc)?

I'm trying to clear an object from memory ready for garbage collection but for some reason it's hanging around.

View 2 Replies

ActionScript 3.0 :: Dynamic Textfields And Listing Them

Mar 13, 2010

so i want to have my dynamic text listed with a consistent space between each textfield. However, the textfields can have varying amounts of text, so just doing txt.y = t*40 would not cut it. I've tried getting txt.length to calculate how many lines it would be, but if i change the font size it changes everything.

View 2 Replies

ActionScript 2.0 :: Listing Mcs By Pressing Buttons?

Jan 30, 2012

What im trying to acomplish is to list some mcs by pressing buttons.I got 5 buttons and 5 mcs.If the user press for example 3 buttons the objective is to list that 3 selections in same selection order and if the user deletes the 2nd of the 3 selections the 3rd selection takes the place of the 2nd selection (a population list). I attached a link to the source file.

View 3 Replies

ActionScript 3.0 :: Make A Shared Object Save A User Name For A Scoreboard?

Jun 22, 2011

how can i make a shared object save a user name for a scoreboard it works like this i made a mc that is the scoreboard and the scoreboard has text boxes in it and the game gets a popup when it starts with a editeble text i want that text to save on to a text box in the scoreboard mc how can i do that?

View 3 Replies

ActionScript 3.0 :: Flash Game Scoreboard - Setting Up A Scoring System

Apr 5, 2012

I am making my very first AS3 game, and though it's quite simple I'm having trouble setting up a scoring system. The concept of the game is simple. Objects appear on the screen, clicking the objects adds points. For this project I am working with 3 AS files, a Document class and two movieclip class files. I would also like to track how many objects have been added to the stage in addition to the score which should track how many objects have been clicked. Here is my Doc Class

[Code]...

View 14 Replies

ActionScript 2.0 :: Class - Store Listing Not Working.?

Jun 13, 2006

I have lost the AS 2.0 Class file for this script, can someone look at my flash file and see if you can get it to work? this program list stores for a company, the drop down menu serves as a selector for the states and the scroll box list the stores.ive been trying for 3 weeks now. the script reads external text files to show the information.

View 1 Replies

ActionScript 2.0 :: Tween Class Properties Listing?

Apr 2, 2009

I'm trying to find all the class properties for the tween class. I know of:

[Code]....

are there more? Is there a listing somewhere on the web that has this information?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved