ActionScript 2.0 :: Ranking System Setup - Keeping Highest One In TextBox?
Feb 27, 2009
I have a ranking system set up, and its functional. The movie clips "a"-"d" displays the rank. While the dynamic text box "one" is changing for future reference.
However, I realized that if you got a rank of B, and you replayed the level, and your rank went down, you'd want your better rank to stay in place. So how can I keep the highest rank in the dynamic text box "one", so it doesn't change if you later get a lower rank?
I'm making a dialogue based flash game.When a player clicks the right response I want them to gain/lose points.What is the best way to accomplish this?I'm in need of correct code/script because the way I'm doing things now doesn't work.
The buttons that allow for a gain/loss of points are inside of movie clips and are also on different layers, so I thought using a global variable would allow for editing it anywhere,but when I click the buttons that //should// make the player lose or win points, the value does not change, either that or I get a "NaN" in my dynamic text box.
I have a series of editable text areas in which I want to be able to add a variable on the click of a button.
If I click the button the textarea loses focus and so I cant code which textarea I need to add the variable into. Can anyone think of a way of keeping focus on the textbox, inserting the variable and then allowing the user to carry on typing.
I've been playing around with the setFocus function trying to get this to work with no success.
Here is a snippet of my code:
public function addFirstName(myText:string):void{ myText = myText + "<<firstname>>"; } <mx:TextArea id="txt1" change="text1=txt1.text" text="{text3}" editable="true"/>
In the process of making a pinball game, i wanted to set up a system where a ball would bounce on an object, and eventually come to rest on it. Everything works fine, but eventually the ball just goes through it instead of coming to rest on top of it. I do not understand why this happens, and would like to know if there is anything i can do to fix this. The .fla is attatched.
I have a login system set up in flash where people enter an email and password. Hence, there's two text fields and a submit button. This submit button responds to the Enter key on the keyboard. The problem is that if I define those two textfields with tabIndex, the submit button does not respond to the enter key anymore. Do I need to use listeners to fix this somehow?
I've placed an input text box over an image of some lined paper and would like to set a limit for the number of lines that can be typed, as I would like to avoid the text scrolling (I tried the maximum characters option, but it doesn't count spaces, perhaps there is a way to make a space count as a character?). After the user goes beyond this line limit, it would auto-tab to another piece of paper, the auto-tab code's not a biggie, I can code the setFocus, but I'm really struggling to work out how to set a limit on the amount of lines, and the subsequent event that would trigger the auto-tab.
I'm trying to set up a preload system that can load multiple XML files and manage an overall progress bar but got immediately screwed by ProgressEvents not bubbling. My basic code set up is: Document Class
So document class up an array of xml paths and passes that to the XMLManager, that then iterates through the array and creates a new XMLloader for each path and stores those XMLloaders in another array. The XMLloader goes off and creates an URLLoader that loads the XML. It has listeners for Event.Complete, IOErrorEvent.IO_ERROR and ProgressEvent.PROGRESS which is fine.
I'm getting the correct progress data in my progress handler but what I want to do is broadcast that progress data straight back up to the Document Class which I had thought would be where dispatchEvent would come in by doing something like this in the XMLloader class:
I am working on ranking drag and drop. The problem appearing here is in some of the boxes am able to put 2 sources of movieclip which shouldn't happen. On one target only one source should be available at one time.If thers already any source available on the target the source which we dragged should go back to it's original position
I have started the vhost setup. I have cpanel on the server and I added the domain and it resolves to the hosting account just fine pull up www.domain.com and goes to server.
I added the www.domain.com vhost. I pointed the application dir to /home/domain/public_html/applications/
I copied live over to applications dir. I setup user and pass for the virtual host login.
I'm using Flash CS3, AS2, PHP, mysql database with phpbb user registration. What I'm trying to do is a make a contest game where you have 5 different ladies and the users get to rank them in order from 1 to 5. Since it is a contest, users will need to be logged in. We already have a database of users based on phpbb, and a registration page. I need them to be able to log in using that username/pass and then they can play the game.
The game consists of a drag and drop mechanism (which I have) so the user can drag "#1" to "girl-4", drag "#2" to "girl-5" etc. Once they drag and drop all the boxes into the order they want, the user then submits it. The data I need to capture in the database is the User, date/time, their rank order (seperated so we can do a query to figure out how many they got right out of the 5.) The final twist is that we are going to have 9 total 'games', one each week for 9 weeks, and we only want users to be able to play once per week.
For an example you can see a working version here. That one does a bunch of more complicated stuff that I don't want to do. The programmer that did it is no longer here and it has been hard trying to decipher his code. I have the whole drag and drop mechanism using the old code from the above example. This is a snippit of the code. drag1_mc is the number they drag (there are 5, so drag1_mc, drag2_mc etc.) and drop1_mc is the rank location. (also 5, drop1_mc, drop2_mc, etc)
I am enquring as I wish to add a 'behind the scenes' most popular ranking element to my site, thus not only by clicks but by time spent on a page. Thus ideally indicating which pages are of most interest. Does this sound reasonable?
I got a textfile who i am reading on a serverside script and passing it as a script to my client side as3 code. The problem is that i am using characters like ä,ö,ü,ß and this isn't well displayed. I tried System.useCodePage but the compiler complains about : 1120: Access of undefined property 'System'. It doesnt matter if I tried this on the first line of the 'Action' in the first scene or in the first line of the first .as file i am loading. (btw i am only working with .as file and not in the timeline). When i am importing flash.System.* the compiler complains he dont know useCodePage.
basically sending and recieving variables from a php page. I want to be able to specify what my textbox on frame 5 says in the onLoad statement. Is this possible?
Currently the only way I have been able to get the text to display is either to use the textbox variable and declare that in the onload statement, or to put textbox.text = mylogin.message; on the actual frame.I doubt there is a way to do it, because the actual textbox hasn't be created yet, but if there were a way, that would be nice.
basically sending and recieving variables from a php page. I want to be able to specify what my textbox on frame 5 says in the onLoad statement. Currently the only way I have been able to get the text to display is either to use the textbox variable and declare that in the onload statement, or to put textbox.text = mylogin.message; on the actual frame.
i have 2 set of textbox, 1 set of the text box contain 6 textbox and the other set of text box contain 12 textbox. how do i make it like for the first set of textbox to compare with the second set of textbox? eg. 1textbox1.text = 2textbox1.text and the first set of textbox right, each of the 6 textbox have to compare with second set of textbox which is 12 textbox.
I have 3 movieclips and inside them loads external txt.files .To MovieClip number one loads 1.txt, to number two loads 2.txt and to number three loads file 3.txt.Allright everything works, but......what if I wantet to load the txt-file that has the highest number to the first movieclip example 65.txt, and to number two the 64.txt, and to movieclip 3 txt-file 63. And when there is txt-file called 66 in the folder it loads to movieclip one, and 65 loads to movieclip 2 etc... I think everybody gets the point.Is it possible, that Flash look up the txt file that has the highest value?
i have 3 variables and im executing a block of code depending which on has the highestow do i determine has the highest and the execute the code which ever has the highest
I have a shape and I want to find out what the highest y value is for an x value.Example: I have an oval, and with width 200 px. I input an x value like 78 px from the left and I want to know what the highest y value is that matches the x value (the top of the oval at point x)
i had to remove the flash built form and place an iframe over the top of the animation with an html form! (my reason was that the exported flash file always recognised keystrokes as that of an american keyboard and the @ sign came out as this "when you hover over the icons at the bottom which bring up information contained in a button, it falls behind the iframe.is there anyway in which i can make that particular button that contains a movieclip get the next highest z index to go above the iframe?FYI:-i have tried this on the button instance but does not work...
on this page .i had to remove the flash built form and place an iframe over the top of the animation with an html form! (my reason was that the exported flash file always recognised keystrokes as that of an american keyboard and the @ sign came out as this hen you hover over the icons at the bottom which bring up information contained in a button, it falls behind the iframe.is there anyway in which i can make that particular button that contains a movieclip get the next highest z index to go above the iframe??FYI:-i have tried this on the button instance but does not work...
i am trying to do this After you type in textbox A (eg." HAHAHA")And when you pressed a button "submit_mc""HAHAHA" will appear in textbox B i know it involve strings , but i tried my best but i cant figure out
Is it possible to make this a mask? The system contains one movieclip of a circle called ball, also a class called ball and a class called particle. I want the particle system movieclips to display an image...I'm sure this is possible...just have not been able to find a way. A little backround, I'm a completely selftaught n00b when it comes to AS3, but I'm grasping it fairly well... the tutorial is on this website, called A Simple Particle System Using Actionscript 3.
I'm creating this shooter game. I attached a crosshair mc at the beginning with the depth set to getNextHighestDepth.However I keep adding the monsters mc dynamically when the game progresses, also with getNextHighestDepth. So the monster mc will keep overriding the depth of my crosshair's depth. how to get my crosshair mc's depth always to be on top of everything including the monster mc.I tried getNextHighestDepth()+1000 for my crosshair mc. But it was dumb because the monsters keep getting getNextHighestDepth as well. I assume that monster's depth would be 1001, 1002 and so on...
ok so in actionscript using xml I can find all the nodes of the same name using
xmlList.descendants("nodename");
and that returns me a XMLlist of those nodes that exist within the xmlList I provided all well and good but now I want to only get the one node of the returned value that has the largest value.
Do I have to loop through the resulting nodes or can I get that node without a loop maybe some other xmllist function I'm not aware of ?
I have an array of image width values pulled from XML. I want to simply look at the array and return a value that is equal to the highest number in the array. e.g. the array might end up like array [250,600,350,375]and I just want something that returns the highest value (in this case the 600).