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


Similar Posts:


ActionScript 2.0 :: Array Text Into Textfield And Creating New Line For Each Array Element?

Oct 4, 2006

I have an array called dropTarg1 which stores dropped-in items.I want to loop through this array and in a textfield, display each array item on a new line of this text fieldI think I need to use something like Array.join("/n") but I can't get it working properly. I hope that the /n would create a new line of the text field called reviewBoxContentText.

for(var i:Number = 0; i<dropTarg.length; i++){
with(reviewBoxContent.reviewBoxContentText){
autoSize = true;

[code].....

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 :: 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

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

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

Creating And Calling Array Dynamically

Jul 1, 2010

I would like to be able to create and call an Array dynamically. So to pass a name through a function and create an array based on that name.Then to store values into sections in the array. I got the creating the array dynamically working, but I can't seem to store into it.

Code:
Sort = function (numOfVars,Name,toSort){
This works
_global[Name] = New Array(New Array (),New Array());
This does not work
_global[Name][i][c]= 3
This does not work
_global[Name + "[i][c]"]= 3
This does not work
_global[[Name][i][c]]= 3
}

View 1 Replies

ActionScript 3.0 :: Shortcut For Creating Array?

May 4, 2010

I want to create values in an array 1-25, and I was wondering if there was a shortcut or do I have to actually type in the numbers from 1-35?var shortArray:Array = shuffle([1,2,3,4,5,6,7,8,9,10 etc.]);

View 2 Replies

ActionScript 3.0 :: Creating Array From XML File?

Nov 18, 2011

Currently my application uses the following arrays to populate a map with data depending on the user's selection.
 
<fx:Declarations>
<fx:Array id="fwo1">
<ammap:MapArea instanceName="borders" color="#FFFFFF" mouseEnabled="false"/>
<ammap:MapArea instanceName="SE" title="SWEDEN" value="4447100" customData="

[Code]....
 
After much searching, I just haven't quite found an example that will let me make the leap from hard coding to dynamically loading the data (in large part, because of the name space declaration as part of the array element).

View 2 Replies

Creating 2 Label Array's On Frame?

Jun 5, 2009

When i try to add label components through a array to a single frame only the last one that was added shows up. Then if i was to comment out the 2nd array of labels. the first one will show.

Code:

Exchangelist = new XML (); Exchangelist.ignoreWhite = true; stop() Exchangelist.onLoad = function (success) { if (success) { _global.NextNum = 0; _global.txt_ExchangeNumber = []; _global.txt_ExchangeID = []; _global.txt_ExchangeName = []; [code].....

View 13 Replies

Actionscript 3 :: Creating Multidimensional-array From Xml?

Feb 25, 2011

I want to create a nested arrays. Here is my code, after I loaded xml.

function readXML(event:Event):void
{
data = new XML(event.target.data);
for each (var usr in _data.item)

[code]....

View 2 Replies

ActionScript 3.0 :: Creating A Multidimensional Array

Aug 3, 2009

I'm pushing my comfort level with a multi-dimensional array. I' first created this array with brackets, but realized it should have been with parentheses, but I still get an error with the following attempt. The error reads, "1084: Syntax error: expecting identifier before rightparen"This error points to the very end of my statode]ement ");" My error is probably pretty obvious, but I can't see it.[c

View 1 Replies

ActionScript 3.0 :: Add To Array Without Creating New Index?

Feb 3, 2010

How can I add to an array without creating empty values.. the indexes are id'
So I cannot use push..

Or is there a way to remove associative array indexes? I cannot get it to work with splice...

ActionScript Code:
var test:Array = new Array(1,2,3);
trace('before splice:' + test.length);

[Code]....

View 2 Replies

ActionScript 2.0 :: Creating A Variable From An Array?

Mar 17, 2010

I have a series of buttons within an array called (a,b,c,d,e,f,g,h,i) see below

ActionScript Code:
var myArray:Array = [a, b, c, d, e, f, g, h, i];
for (i in myArray) {

[code]....

View 2 Replies

ActionScript 2.0 :: Creating Tweens In An Array?

Mar 24, 2006

I can't wrap my head around this. Im setting up 20 tweens, all created within a for loop, and that works ok. But I only want each tween to start after the previous one is complete. Something like

[Code].....

View 1 Replies

ActionScript 2.0 :: Creating A Random Map Into An Array

Aug 1, 2007

I'm trying to create a program that creates a random map for a side scrolling cave. So I need to store the roof and the grounds y coordinate into a big array, like 10 000 pieces of wall.

The only way I've gotten it to accept some data into the array is like this but I want something cleaner and something that can go on forever.

How should I format the first 4 lines of code so that the array accepts commands like this and expands for the for loop as needed?

[Code]....

View 1 Replies

ActionScript 2.0 :: XML - Creating An Array Of The Data

Jul 5, 2009

Hope someone can point me in the right direction, this is my first time attempting to user arrays and im having a bit of trouble... I, trying to create a mp3 player from an xml feed, the feed contains total 200 tracks, with 10 genres, each containing 20 tracks. All the individual data for each track is held within .attributes of a single node, including the ID for the associated genre. What i need to do, is build an array for each genre. I've managed to seperate the genres using the code below, but it doesn't seem to be creating an array of the data??? When i trace the Pop array below, flash outputs the list of tracks i need, but if i try and access a specific track from that list using trace(Pop[1]); for example, it outputs "undefined" 20 times.

[Code]...

View 2 Replies

ActionScript 3.0 :: Creating Object References In Array

Oct 29, 2010

I want to do is create several arrays to hold groups of movie clips (i am using as buttons) which have similar functions so that I can add event listeners using a for loop statement rather than making a huge list of add and remove event listeners.I have seen this method working before but I cannot get my code to work!! This is probably a very noob concept but I have been struggling with it for hours.Ok, so in the extends movie clip bit on my as file I declare the array as such:public static var controlBtns:Array;Then in the initializing function I put values into the array as such: [code]The trace seems to output all the object names (as they are listed in the library) and then I get this error: TypeError: Error #1010: A term is undefined and has no properties.Which is kind of obvious as I cannot seem to access the movie clip instance names that I have set up in the array.I tried putting quotation marks around the names in the array making them strings but then I can't access properties of strings - which is obvious enough to.

View 8 Replies







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