Incorporate Scoring Code Into Current Game?
Apr 28, 2010I'm trying to incorporate a scoring code into the current game.
View 3 RepliesI'm trying to incorporate a scoring code into the current game.
View 3 RepliesI'm building a simple game where players scores 1 point each time his/her paddle makes contact with a ball falling vertically from a random X position. All works well - except for the scoring. Hits will score anywhere from 1 to 4 points; they should only be scoring 1.
View 2 RepliesI am working on a game that is set up like a slot machine. The first box contains a name, the second box cotains a piece of information about the person and the third box contains another piece of info. Each box has a movie clip in it that contains 10 frames, each frame has text in it (a name or piece of information). There are up and down arrows above the second and third box as the user can control what piece of info is in that box using the arrows (if the user clicks the up arrow they go up 1 fram to different info....if down down a frame to new info.) The first box is not user controled, it has a button that randomly generates the name the player is given with a spin animation.
The goal of the game is to match all three boxes the random name with the 2 user controlled pieces of info. If this happens I want the player to receive 20 points. However, if the player only matches one of the pieces of info to the random name then they should only get 10 points. If they do not match ny pieces then no points are awarded.
I figured the best way to do this would be to give the corresponding correct answers and names matching variable names and set it so if you have 2 matching variables you get 10 points and if you have 3 matching variables you get 20 points (no points awarded for 1 variable because 1 variable alone would be the name). My problem is that I dont know how to assign a frame a variable number and I also dont know if its even possible to do something like this. Am I on the right track or is there a much better way to set up scoring?
My company has developed a very simple "Whack-a-Mole" type of game for a social media campaign. See here: [URL]. Our client is now requesting that we add a scoring system so that we can offer a prize to the 3 top scores. What I need is to be able to link the number of "whacks" to a score and enable the user to input their email address at the end of the game connected to the score they achieve.
View 5 RepliesI 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]...
im a cs5 noob and i have been working on a platform game. I recently created my first main player animation. My question is how would i import that animation to my game?Can i compress the animation to only use 1 layer at all? right now my original is using about 6 layers for 40 frames. How can i take my 6 layer animation .flv file and incorporate it into my game? also, how would i call the animation in as3?[code]
View 0 RepliesIs there a way to get this code to work? It's meant to count the seconds passed while playing the game and gives a bonus multiplier to the current score when the game ends. I don't know how to get the returned value to combine it into the multiplier int variable. Is there any way to get this code to work or is it completely wrong?
View 11 RepliesI'm currently working on a project where I want to incorporate "find a location" functionality using the user's zip code. Basically, the user needs to be able to type in their zip code and once they hit the submit button, they are then taken to a page where it lists all locations available. Mind you, the website is ALL Flash. Currently, it's in ActionScript 2.0, but I could (at least with these pages) convert to ActionScript 3.0 if needed.
View 8 RepliesI'm just curious about the implementation of timers as flash is single threaded.If a timer event should fire, does it interrupt the current executing code, fire the event and then go back, or does it do something else?
View 1 RepliesI am trying to display current date on click of button into a dynamic text named as display.[code]...
View 5 RepliesI'm creating a new look for the xspf player: [URL]The playlist highlights the current song being played. I'd like to change the color but can't find where that option is listed in the .flv file, or in the actionscript file.
View 2 RepliesI have trouble making a code that automatically writes the mouse's current x and y position as text every frame.
View 3 Repliesi'd like to do something like this:
[Code]...
of course i could hardcode that - but if I then change something about the as file, the linenumbers won't be correct anymore, or maybe i rename the as file and so on. It'd be great to be able to create that string somehow using compiler directives. Is this Possible in an AIR application created with ActionScript 3.0?
just want to ask about loading advertisement code!How do you add the advertisement code (adsense) into flash games??my site Funny Games have over 5k games but they are getting from others sites thus I have no original files. How can I add more code into the current files?
View 1 RepliesI am looking to make a simple ps3 game in actionscript 3.0. what i am aiming to do is, have scores for player one and player 2, I would also like to have the option to add players if at all possible up to say 6 players. I would also like to have say 1000 questions about movie trivia only appear in random order and wont re appear for the rest of a game once asked. for the next part i will use an example. Lets say player one is asked a question and gets it wrong player 2 answers the question and gets it right. how would I go about making player one get no points and player 2 get say 100 points? If say 2 players are playing and one gets it wrong and the other gets it worong or right the computer will reveal in a green highlight what is the right answer. I know I probably wont get all my answers solved i realize this is a complex thing to code i just cant find tutorials or answers anywhere on coding actionscript 3.0 for a ps3 game.
View 1 RepliesIf I wanted to code a desktop-based game, I could pull some XNA code and UDP sockets and make a decent multiplayer game. I would have an extremely clear of how to code the game I wanted.But if I wanted to code a browser-based online multiplayer game, how would I do it?ou can't use XNA....I've been looking at some questions and I'm seeing PHP and ASP.NET and Silverlight and Flash and Java as the alternative languages...I really don't understand how it works. I mean, for a desktop-based game, you're opening a UDP socket and accepting clients and transferring data, updating player states, drawing the results using XNA. But in a browser, how do you open a socket and stuff? How does that concept work, communicating to people in realtime through a web-browser.
View 6 RepliesI've created a flash file (my project) that is loaded into another swf (our player) file on our site. When I test the project file on my computer the scoring displays correct at the end of the lab. When it is loaded into our swf player on the site the score doesn't display. I'm at a lose for why this is happening.
[Code]...
Finished with coin toss gameWhat done good, what wrong..? what need change? what method better?And now in this user can be winner just 50% ?Attached files.Also code here:
import fl.controls.RadioButtonGroup;
coinToss_btn.label="Coin Toss";
coinToss_btn.useHandCursor=true;
[code].....
Im making a transition from Java to Flash/Actionscript and Im having sort of a hard time figuring out where to write my code for my flash game loop(or engine) due to flash having "frames" unlike Java.Am I able to put the loop inside the Document class even having like game menus in the game? I havent found a way to put it in there without it always running when the flash application begins.Or should I just have the game loop called every frame? For instance, frame 4 will be level 1 and so the engine will be called out there. And frame 5 will be level 2 and ill call a different instance of the game engine there.Im just having a difficult time due to the "frames". So where would be the best place to put the game loop?
View 4 RepliesI have a bunch of textboxes that they have to click a button to check to see if their entry is correct. I have this code within the buttons
on(release) {
if(_root.q5answer == "2") {
_root.correctmovie.gotoAndPlay(2);
_root.total = _root.total + 5;
[code]....
it adds 5 every time to the dynamic text box...I have this within the correctmovie (which is checked after each question):
if (_root.total(Number(100))) {
tellTarget("allcorrect") {
gotoAndStop(2);
}
}
it adds up correctly, but when it gets to 100, it doesn't play the allcorrect movie.
I picked up the book ActionScript 3.0 Game Programming University.so far it looks good. I have downloaded a few of the samples of code and some don't work or give an error message.TooEarlyExample gives me an error message of;TypeError: Error #1009: Cannot access a property or method of a null object reference.at TooEarlyExample()The flash file has two text fields and the code is supposed to populate them with some text. The first text field doesn't get populated with text but the second one does.
View 7 RepliesI'm having a problem with my multiple collision detection code for a platformer game.. It checks for collisions on all objects separately and it checks only one object per frame. I need to make somekind of a loop so that it would check every object in one frame. Anyone got an idea? It's coded like this:
[Code]...
I'm trying to make a quiz with multiple question types (multiple choice, true/false, fill in the blank, drag/drop). The problem I am having is that the questions are not scoring correctly. Here's what happens
[Code]...
i am making a shooting game for ict and i dont know how to make a scoring system or where to put the code this is my code:
stop();
var numEnemy = 3;
var fire = false;
[code].....
I'm designing a platformer game, in which the code is all held within the character MC. I want to pause the game using something like 'delete this.onEnterFrame' as a start point to terminate code. The code layout within the character is like so:
onClipEvent (enterFrame) {
...
this.onEnterFrame = function(){ //within clip event
...
if(btnon == 1){ // when button pressed(on stage)) global value of 1 is true
delete this.onEnterFrame;
}...}}
Due to the fact its within a clip event structure, it doesn't pause it, instead it slows everything down. Would I have to construct all my code in a frame layer or can I still use an MC to terminate this?
Here's what I want to do: when a player wins a game (coded in flash/actionscript), they are given a personalized secret key, which they can email to me in exchange for a prize. I can then validate the key on my end using a private algorithm. I need to design it so that it is practically impossible for hackers to generate a valid prize key without winning the game.
I assume that any SWF file is basically vulnerable to decompilation, but I don't know exactly how vulnerable they are. Perhaps any algorithm for generating a valid key will be accessible to hackers? I have at my disposal all the methods in actionscript 3, as well as a PHP/MySQL server, and I control the server where the game will be hosted.
how can i change this as3 code with hex editing to make this game always show HEADs (or tail ) and be winner its game to bet and u should choose head or tail , and if u guess rite u get money ,if not u lost money i want to always answer be head( or tail) .as file attached.
[Code].....
I am trying to create a quiz in Flash CS5. I have coded all the quiz so that it is done in different frames, such as the start screen in frame 1, then the five questions in frames, 2, 3, 4, 5, and 6 (one for each question). How would I create a scoring system so that if the user got a question right it would add 1 to the score but continue scoring through to the next frame? It needs to have a pass rate of 4 out of 5 correct answers.
View 1 RepliesI have a bunch of drag and drop interactions in my flash file that gets graded, the problem is, they can move it away and back again to make the points keep adding up. What kind of code can I put inside my draggable movie/button to say when it is placed correctly, that is it, it can't be moved again?
View 2 RepliesI am using a learning interactions quiz at the end of an animated movie. Because it is entertaining I would rather not launch as a standalone quiz. Everything works perfectly when the quiz is on its own timeline that starts at frame1, but whether I use loadMovie or use the quiz as a movieclip, or start the quiz on frame 1460 on the scene1 timeline the calculate score control doesn't work. It is called mc, frameNav and it comes with the Flash quiz templates. The AS associated with that mc is below.
[Code]...