Flash - Keep Track Of Score, Then Give Result

Oct 8, 2010

I want to create a very simple game for school. The user chooses answers based on questions, at the end the software presents some choices to the player based upon what they said. They have to choose food they like to eat, and the game tells them about the diet, they have 9 choices.

I wonder how I should keep track of what they player chose, and how to come up with the result based upon those choices. I made it with a score, so each answer had a value, but various arrangements of answers had the same score.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Keep Track Of Score, Then Give Result?

Oct 8, 2010

I want to create a very simple game for school. The user chooses answers based on questions, at the end the software presents some choices to the player based upon what they said. They have to choose food they like to eat, and the game tells them about the diet, they have 9 choices.I wonder how I should keep track of what they player chose, and how to come up with the result based upon those choices. I made it with a score, so each answer had a value, but various arrangements of answers had the same score. I'm new to Flash and Actionscript 3, I understand conditionals and variables but am unable to piece the logic together for this in my head.

View 9 Replies

ActionScript 2.0 :: Keeping Track Of Score On A Leader Board?

Jun 10, 2010

I create a password and go to save the password and get an error saying it not in the table.The error was because i had to press generate php code.That was so fustrating. couldnt belive it . Ive just wrote the answer now if any 1 else has the same error. It was annoying .

//__________________________________________________ ___________________________________
http://library.creativecow.net/artic...o-tutorial.php
<?PHP

[code].....

View 2 Replies

ActionScript 2.0 :: Get Score Text Box To Gotoandplay Another Frame - Scene When It Hits A Certain Score?

Aug 10, 2004

Im designing my own game in flash, iv set up a score text box and it works fine. Except i just cant seem to get it to gotoandplay another frame,scene, when it hits a certain score??

View 4 Replies

ActionScript 2.0 :: Score - Movie Go To Frame 3 If The Score = 500?

Feb 17, 2004

i am building a shooting game and i was wondering if it is possible to have the movie go to frame 3 if the score = 500.I.E Score is displayed in a dynamic text box and everytime the enemy is hit the:

_root.score +=50
=============
on the first frame of the film i have the code

if (_root.score == 500) {
gotoAndPlay(3);
}

View 2 Replies

Actionscript 3 :: Multiple Dynamic Text Score Display - Modifying Each Text One After Another And Incrementing The Score By A Certain Number

Feb 23, 2011

I have a result screen that shows bonus points and such. I want each text field to increment one after another and also have it increment by a certain amount each frame. Result Screen pops up. First is the player score check the player score, is it more than the score we want to display if the player score is greater than the player display score by 100 increase the player display score by 100 if the player score is greater than the player display score by 10 increase the player display score by 10 else increase the player display score by 1 when finished move to the next score...and so on. I have thought of using timers to move from one score to the next, but not being in an Event.ENTER_FRAME it only does one if then moves to the next one.

Also the if statement for incrementing the score looks ridiculous and I'm thinking there has to be a better way to do it. I was thinking of making it a separate function but then I wouldn't know what to return, or how to return it so it looks like its increasing and not just showing the total number instantly. I'll try to expand on it a little more.

View 1 Replies

Swf - Getting Value From Score Variable In Flash?

Aug 25, 2011

I am editing a flash game,I want that whenever user press the submit button,his score should be saved in the database at my Server.How i can achieve this task?I had got the variable in which score is stored.I can i send this to my database.

View 1 Replies

ActionScript 3.0 :: Flash And Php Score Refresh?

Dec 6, 2010

problem is the score board is shown at the beginning if requested and at the end to show your score when the game is finished. The problem I have is refreshing the scores (replacing the current text in the boxes) rather than just adding the text again into the dynamic text boxes..Here is my code :-
 
var tab = "game1score";// update for each game // game2score, game3score....
var filesend = "receive.php";
var modesend = "post";
 
//This is called when the high scores are viewed at the beginning of the game
 
private function onHighScoresButtonClick(event:MouseEvent):void {                 var receptobjet = variableTransaction(filesend, modesend, tab, false, false);     highScoresPage.rejouerButton.visible = false;     highScoresPage.blueMan.visible = false;     removeChildAt(0);     addChildAt(highScoresPage, 0);}[code].....

View 7 Replies

Flash :: Security Achievement And Score API

Apr 29, 2011

Over the years I've become an uber-nerd when it comes to flash game development. Now I'm thinking about looking into using my skills for helping other game-developers out there.I want to develop an API in AS3 which will allow the developer to do (as a start) the following:Display a dialogue which lets the user log into their "account" (hosted on my site).Send a score/value to the website and attribute it to the logged in user.Unlock an achievement (achievements will be set up by the developer in the web interface - which is where they will also get a key of some type to use with their API.Display highscores, other players profiles in-game, etc (show basically any stats in-game).All easy enough to develop straight off the bat. However; where it becomes frustrating is security. I'm not expecting an indestructible solution that I'm fully aware isn't possible, but what would be the most defensive way to approach this? One thought I've had was converting my API to a component so there's no access to the code (unless you decompile). The problem here is it's just not friendly to the developers, though it would allow me to create my own graphics for the UI (rather than coding many, many sprites).Private/public keys wont work unless there is very good protection against decompiling.

View 3 Replies

IDE :: FLASH Secure Score Submit?

Feb 8, 2009

I'm building a flash-game-site for a while. The big trouble is Secure Score Submitting System .I search on the net and find some ineffective techniques:

-Secret word method: there is an secret word (crypto pass) on the server and flash gets it from server and uses for crypting score data then sends it to server. But the algoritm that does the crypto job, can be accesible with a swf decompiler. Also getting the secret word from server outside of flash is simple. Not safe!

-HTTP_REFERER method: php (or what else) check HTTP_REFERER data to determine where the post coming from. But with a simply firefox extensions, the referer header can be changed. Not safe!

That is my own idea but can only make cracking harder, not more:

-We can get flash vars with js (:swliveconnect) and send to server. Flash just make a fake submit that makes no effect. Just a trick. But not safe

View 2 Replies

IDE :: Flash Quiz - Score Keeper?

Nov 9, 2009

I've been fiddling around with the flash quiz template and it's pretty much what I need to a point. But I really just need is to know how to keep score?

View 1 Replies

AS3 :: Flash - Resizing As A Result Of An EventListener

Jun 16, 2010

I have coded a map that when a province object is clicked on, it should move to the center of the screen and grow a percentage of the width, along with displaying a number of different things.

The problem is that in order for the image to resize it needs to be clicked on twice. It moves, and all of the children display just as they were designed to do, but the resize doesn't work on the first click.

menuItem4_mc.addEventListener(MouseEvent.CLICK, onClick);
public function onClick(mc:MouseEvent):void {
menuItem4_mc.width = width * .65;

[Code]....

View 1 Replies

ActionScript 3.0 :: Flash Returns That Result?

Oct 19, 2010

I really don't understand how the results I get are possible.Here's my code:

ActionScript Code:
patch = 0;
//Assign the correct percentages using the data recovered from the database[code]..........

And, here are the traces I get:

Quote:
int_tmp: 66.6
int_tmp: 66.6
int_tmp after: 66.6[code]....

my code somehow manages to say that the result of 66.6 + 33.3 = 99.89999999999999

It might be possible in some alternate universe, but here on earth, I should get a result of 99.9... I'm really hoping one of you can explain to me why Flash returns that result, cause really, I'm at a loss here... this line:

ActionScript Code:
var int_tmp:Number = int((nbUserArray[t]/nbUserTotal)*100*10)/10;

I made sure the values are the correct ones, plus the traces confirm that the first time, it equals 66.6 and the second time it equals 33.3. So really, I don't understand how it can return this... monster of a result .

View 5 Replies

ActionScript 2.0 :: Give The Flash A Transparent Background?

Dec 9, 2010

I have an animation that uses a button to call the animation.However, I am placing this flash movie on top of html as I want the animation to play as users hover over a div.I wanted to ask if it is possible to have a transparent button because at the moment the flash is appearing on top of the HTML. I have managed to give the flash a transparent background, but not figured out how to have a transparent button.This is my actionscript:

PHP Code:

// Action for button on rollout
button.onRollOut = function() {
Dog1.onEnterFrame =function () {[code].....

View 8 Replies

Flash :: Possible For One SWF To Load Another But Give It Fewer Privileges?

Sep 17, 2010

From a webpage, I can specify that a SWF should be loaded with "allowNetworking=internal" and "allowScriptAccess=none" to prevent it from modifying the state of the browser.

Is it possible for SWF A to be loaded with no restrictions, and have A impose those restrictions on a SWF B that it loads?

View 1 Replies

Flash :: AS3 - Give DisplayObjects Custom Properties?

Oct 10, 2010

I am very new to AS3, and I'm confused about how things that would have been simple in AS2 are so complex and tricky now. For example, I want to create a bunch TextField objects that, for some reason, rise up every frame (as in : object.y-=1; ).However, I also need each TextField to reference the TextField that was created just before it.

I tried creating a variable that would hold such a reference : ThisTextField.Ref=LastTextField; but - this returns an "Access of possibly undefined property..." error. It seems I can only have custom properties on mere Objects ! This is annoying because an Object doesn't seem to accept event listeners (remember, I need them to do something every frame). Is there a way to simply set custom properties on my TextFields, without having to use custom packages ? Or is there a way to use event listeners on Objects ? I've read something about strict mode which could allow setting properties on other objects - what are the risks of turning it off ?

View 3 Replies

AS3 :: Give Link To A Movieclip To External Url In Flash?

Jan 17, 2012

I wanna link a movie clip which has instace name test1 to a external urlI am using a menu list which has main movieclip instance name as 'Primary_Menu'. And inside this main movie clip there are 7 menus (home, about us etc..) each menus are movie clip and has instance names.Below code is written for linking them to respective frames. but i need to give external url for last menu (test1)

Home_MC.logo_btn.addEventListener(MouseEvent.CLICK,ShowHome);
.Primary_Menu.pmenu_btn1.addEventListener(MouseEvent.CLICK,ShowHome);
Home_MC.Primary_Menu.pmenu_btn2.addEventListener(MouseEvent.CLICK,ShowLocation);

[code].....

View 1 Replies

ActionScript 3.0 :: Pass Variables From Flash To Php To Process And Get Back The Result To Flash

Oct 17, 2009

How to pass variables from flash to php to process and get back the result to flash

this is th php code
<?
$money = $_POST["fname"];
$persent = $_POST["age"];

[Code]......

View 5 Replies

Add Highest Score Table In My Flash Game?

Jul 27, 2009

I want to add highest score table in my flash game ? I want to upload my game to web so visitors can play on my page and see how good they were. Im working with as2

View 1 Replies

ActionScript 3.0 :: Make A Score Counter In Flash CS5?

Sep 20, 2010

Iam trying to make a flash counter for a shooting game where each time you shoot a enemy you get 10 points. Does anyone know the code for score counting. I have made a dynamic text box with the word "Score" in it.

View 7 Replies

Flash :: Write Game Score In XML File?

Feb 19, 2011

I am working on a flash game which is a shooting egg game. I want to export a score(what ever it may be ) to the xml file so that using php developer can take it from there n post it to the wall just like we play games on facebook n it asks you that "Do u want to post your scores?". The variable of Dynamic text box is score.

View 1 Replies

ActionScript 3.0 :: Possible To Fetch Captivate 4 Score Into Flash?

Jan 5, 2010

I wonder whether anyone knows of a solution to this: I want to embed a Captivate 4 quiz in a flash CS4 file and retrieve the score from the Captivate SWF so that I can use it in my flash file (AS3)- does anyone know a way of doing this (?eg. shared objects?). Communication between Flash and CP seems to be a lot more problematic than I anticipated.

View 0 Replies

ActionScript 2.0 :: [Flash 8] Getting Variables For Score Counting?

Nov 24, 2005

I am creating a simple game where you must remember the name of a number of people. On the stage is a table with faces. Text appears, asking who, for example, "Mike" is. You then have to click the correct face. The questions appear randomly.I have come this far, but what I want to do is the following:

1) Restrict the number of random questions, presumably by adding a variable, with the value incrementing by each question, and tells the movie clip to go to the "game results" frame when reaching a certain number.

2) Keep track of the number of questions answered correctly/incorrectly. I suppose this is also done easily by adding a value for number of incorrect answers, which is increased for each incorrect answer, with the amount of correct answers being calculated like (total number of questions)-(incorrect answers).

3) Display the number of correct and incorrect questions on the "game results" frame. For example "You answered X number of questions correctly, and Z number of questions incorrectly".

I know that the pieces of code below should be used, but I don`t know how to put it all together, or where to put it. I suppose the main code should be in the first frame, and some should be in the buttons.

Code:
var questionsAsked:Number;

Code:
myValue++;

Code:
if (questionsAsked == 20){
gotoAndStop("results");
}

View 3 Replies

ActionScript 2.0 :: Send Variables From Flash To PHP And Get Result?

Dec 9, 2009

I am new in flash actionscript... I am just starting to learn...How can I send variables from my flash project to PHP and get the resulting values back???

View 0 Replies

ActionScript 2.0 :: Getting The Result Of A Javascript Function Into Flash?

Feb 9, 2007

I have a site that has a button on it and someone did a little javascript so that each time you click the button you go to a randomly selected URL from an array of links. Now, I was told to give my flash button the same functionality. I'm not really a coder, so instead of re-inventing the wheel, I'm trying to get the result of the javascript into my action script. So far, I'm completely unlucky.

[Code]...

View 4 Replies

Flash :: Possible To Track Analytics On An Offline Swf?

Jan 30, 2012

The user is downloading the .swf file (an e-brochure) from a link in an email. I'm trying to track the users interaction on the offline .swf. Is this possible?

View 1 Replies

How To Give Flash Banner (External) HTML Link

Sep 26, 2011

Is there a cross-browser solution available to give a flash banner an html link, without putting it into the flash itself? (i.e. the Flash has no clickable button in it). I tried giving the surrounding anchor tag a high z-index, but that did not work. I'm using the standard google swfobject to include the flash banner, but am not stuck on using that.

View 1 Replies

Actionscript 3 :: Get Flash To Give Hints On Objects That Are On The Stage?

Oct 2, 2011

If I have an element on the stage (let's say a TextField, or a component ComboBox, for example). And I would like, when I reference it in the action script, for the IDE to give me the prompt to show me all the properties associated with that element, how do I create a reference to it, without creating code clutter? I mean, I have a reference to it already on the IDE (the instance name). So, in the IDE I call it myElement.Now, if in code I say var myElement:ComboBox; It throws a conflict at compile time. However, if I just reference it as myElement, it has no idea what sort of element it is, so it offers me no help. I know I can say var myCodeElement:ComboBox = myElement as ComboBox, but I really want to avoid that.

View 4 Replies

Flash :: Give Focus To A TextInput Programmatically In Actionscript 2?

Nov 17, 2011

I am trying to write a small piece of Actionscript that gives focus to a TextInput. The reason being, I don't want my user to have to click into the text field to see the cursor and start typing, it should just already be there.

View 1 Replies

Flash :: Sharing Game Score To Social Networks?

Jul 11, 2011

there is is simple Game ( kids multiplication ) game will be on Normal website

How I can share Game score over Social networks like Facebook without using PHP or any server-side scripting directly from Flash ?

Game is also just XML based game just in the end I want to share User score and website link to any social-network where user want

View 1 Replies







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