ActionScript 3.0 :: Show Msg To User Based On How Quickly Game Completed

Sep 3, 2011

I've developed a game that records how long it took to complete the game. At the end of the game it shows the user how long it too to complete. I want to be able display message to the user depending on how quickly they took to complete the game. I have set up a dynamic text box called "message" that will display the message, but I am struggling to figure out the syntax for :

If gametime is less than 60 secs then message = "well done thats very quick"
If gametime is between 60 and 80 secs then message = "Not bad at all"
If gametime is between 81 and 100 secs then message = "Its good but not good enough"
If gametime is between 101 and 120 secs then message = "You can do better than that!"
If gametime is between 121 and 140 secs then message = "Too slow, you need to practice"
If gametime is greater than 140 then message = "Did you fall asleep?"

View 3 Replies


Similar Posts:


Flex :: Any Method In Module Class Where I Can Hide And Show Based On User Login?

May 19, 2010

<?xml version="1.0"?>
<!-- This module loads an image. -->
<mx:Module width="100%" height="100%" [code]..........

I have such 10 modules. Is there any Method in Module Class where i can hide and show based on user login.

View 1 Replies

Actionscript 3 :: Detecting Out-of-view Flex Controls - Hide And Show Based On User Context

Sep 10, 2009

In my flex app I have custom tooltips on buttons that hide and show based on user context. The problem that I dealing with is that when I call my showTips() function I only want to show tooltips on the buttons that visible in the view. So buttons that on a un-selected tab (tabNavigator) should not show the tooltips. For some reason all tooltips are showing. Is there a way to detect if a button is not in current view, like on a un-selected tab?

View 2 Replies

User Interface - What Does A Web Designer Need To Migrate To Flex Quickly

Mar 12, 2011

What does a web designer need to migrate to Flex quickly? A: tell me how I can get good fast B: tell me why it would be unrealistic to learn Flex quickly I want here both sides of it.

TELL ME WHAT I NEED
- Projects I need to complete in Flex
- Tutorials
- Key concepts
- Other technologies in a nutshell (webservices, SOAP, AJAX, HTML5 etc.)

[code].....

This Flex reference should include everything needed for beginning Adobe Flash Builder 4

View 1 Replies

Actionscript 3 :: Know In Flex When The User Has Completed Resizing The Browser Window?

Sep 19, 2010

I need to do some updates to components after a user has resized the browser window. Is there a good solution to determine when a user has completed resizing? I wasn't able to find any flex events that would cover this case.

View 1 Replies

ActionScript 3.0 :: Tile Based Game - Creating Multiple Sprites Based On Frames

Nov 17, 2009

I'm relatively new to AS3. There's one thing that I don't quite understand about Sprites. I'm making a tile based game, and all the tile graphics for a level are inside one movie clip in each frame. Would I be able to go about creating multiple sprites based on the frames in said movieclip's timeline I would I have to go through and make a separate library graphic for each.

View 2 Replies

ActionScript 3.0 :: Game That Populates User-designed Cards Into The Game Using An External Xml File

Apr 24, 2011

I'm making a game that populates user-designed cards into the game using an external xml file. My main class loads the xml file and then calls to the "Card" class, which wants to use the xml file. I've tried using this.parent and it just gives me a null object reference error. This is what I have so far: Main.as

[Code]...

View 2 Replies

ActionScript 2.0 :: Menu Bar-add Item - When The User Selects "new Game" It Should Restart The Game?

Apr 3, 2009

im creating a card game. i have a seperate timeline for the menu bar. ive placed this code on the first cell of the timeline:

Code:
import mx.controls.Menu;
import mx.controls.MenuBar;[code].....

the problem i get is that when the user selects "new game" it should restart the game. when it does this the toolbar is not reset. instead a new menu item is added (without removing the old one. so evertime the user hits new game, a new "file" menu is added). how do i make sure there is only 1 "File" menu? and im using actionscript 2

View 1 Replies

ActionScript 3.0 :: Set #include Based On User Click?

Aug 9, 2009

Is there a way to set an #include based on a user click?

When I load a .txt which contains all the variables used in a pre-made solution I purchased using loadVars, none of the as code works. It only functions when it's done as an #include:

#include "myvariables.txt"

Is there a way to do have the code use the .txt as if it was an include, but have it set by user click?

View 3 Replies

ActionScript 2.0 :: AI Pathfinding For Text-Based Game?

Jun 1, 2010

Pretty much what I am looking to do is have an NPC find the shortest path from their location to the player's. Everything is turn-based, so the NPC would have the capability to move from one room to another adjacent room in one turn. Keep in mind that there would be no physical manifestation of the code, other than some text that would be displayed when the NPC enters the same room as the player.And as an added aspect if possible I would like the ability to stop NPCs from entering the same room as the player once they've reached it if the room/door/entrance is locked.So the end result would be something like this...

-------[E]
[P][ ][ ][ ][ ]

--------[ ]
[P][ ][ ][E][ ][code]..........

Only difference is that there would be no graphical representation.

View 1 Replies

C# :: How To Code An Web-browser Based Multiplayer Game

Jun 30, 2010

If 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 Replies

Create UDP And TCP Connections In A Browser-based Game?

Nov 13, 2010

I'm working on a game and want the freedom to choose between UDP and TCP connections in the future when I decide to add multiplayer. I'm not sure how something like this would work in the browser with security.

There are two scenarios I can think of for multiplayer. The first is that a player becomes the host of the game (in the browser) and thus would need to communicate with other players directly via TCP or UDP. This would save me on bandwidth costs.

The second scenario would be to have the web server host the game and pass messages back and forth to the clients again via TCP or UDP.

Do Flash or Java applets let me do something like this? If not is there an alternative I can use for the browser or am I stuck with moving to providing a game download and installation?

View 3 Replies

ActionScript 3.0 :: Tile Based Pacman Game?

Feb 28, 2010

I am trying to make a pacman game and was advised that collision detection for a game like this is much easier if you create it using a tile based methodology. I have the map created and the character moves fine around the grid. But once I added collision detection it seems to be a bit off and inconsistent. Im not entirely sure what the problem is with the collisions.

View 9 Replies

Flex :: Get The Broad Position Of A User Based On The IP Address?

Mar 19, 2012

Is there a way to get the broad position of a user based on the IP address? (I'm building an Adobe Air desktop app for notebook users)

View 1 Replies

Load A Varible Xml File Based On User Select Box?

May 12, 2007

I am putting together an artists gallery, and i need to show each artist's collection when you select their name from a drop down combo box. [url]...

create a new xml file for every artist (artistname.xml) to load in to the thumbnail gallery.

QUESTION - How do I make this file to be a variable depending on the user selection from the dropdown.[code]...

View 14 Replies

ActionScript 2.0 :: Horizontal Scrolling Of An MC Based On The User's Mouse?

Jul 29, 2007

I have a strip of thumbnails in an MC that is quite long. I am masking this long strip of thumbnails so only a few can be seen at a time. I want the user to be able to move this strip to the right and left based on where their mouse is.But a lot of the solutions I've seen have used the stage width to achieve this...however, I only want the strip to move if they are over the 'active' area.....basically if they are over the mask area.And then when it reaches the end of the strip

View 1 Replies

ActionScript 2.0 :: MovieClip To Follow User Mouse Based On X Value

Jul 30, 2007

I'm using the following code to have an MC follow the users mouse based on it's x value. But I'd like to have this inverted...so that if the users mouse goes right, the MC goes left....instead of going right along with the mouse.

Code:
import mx.utils.Delegate;
class Mover {
private var target:MovieClip;
private var limits:MovieClip;
private var ease:Number;
[Code] ......

View 3 Replies

ActionScript 3.0 :: Text Based Action Adventure Game?

Nov 3, 2011

I'm currently working on an action adventure game and have run into some issues. I am using flash CS4 and AS3. On the stage I have created a user input text field with the instance name of textbox and a button with the instance name of btn. I'm trying to set it up so that when the user types in a word that word is cross referenced with an array and a function is run. I have noticed that some times the functions are not run in the order there typed. For example if I type "enterdoor. lookaround." Than the following is traced.

" you have entered the door.
.
you are looking around, but don't see anything.
. "

Which is good but if I reverse the order and type "lookaround. enterdoor." then I receive the following.

"you are looking around, but don't see anything.
.
.
you have entered the door. "

Also if I were to type "gobacklookaroundenterdoor" then the following is displayed.

"go back you have entered the door. you are looking around, but don't see anything."

Notice that the function "enterdoor" is run before "lookaround" even thou "lookaround" was typed first. Also if I were to type "enterdoorlookaround enterdoorlookaround" then the following is displayed.

"you have entered the door.
you are looking around, but don't see anything.
you are looking around, but don't see anything.
you have entered the door. "

I cant seem to figure out why the functions are not run in the order they are typed by the user. Not sure if this helps but I have determined that if a function is typed 3 times or more then it only returns the function twice. For instance if I were to input "enterdoorenterdoorenterdoor" then the following is displayed.

"you have entered the door.
you have entered the door. "

I would also like for the user to have the option of typing a function as many times in a row as needed. It seems to me that I'm missing some thing simple. I was thinking if I change the commands "array" to an "associative array" it might process the functions in the correct order. It seems to me that the commands array is being compared to the inputholder array.

this.stop();
import flash.events.*;
btn.addEventListener(MouseEvent.CLICK,textChanged)

[code]....

View 1 Replies

ActionScript 1/2 :: Game Score - Points To Be Time Based

Jul 18, 2009

Is there an actionscript for a point system? I want my points to be time based from this script
stop();
count = 60;
countdown = function(){count--;
if (count ==0){clearInterval(doCountdown);
gotoAndStop(11);
clearInterval(doCountdown);
}}doCountdown = setInterval(countdown, 1000);

View 5 Replies

Flash :: Turn Based Strategy Game Techniques?

Feb 12, 2010

I want to make a turn base strategy game. I was just curious if anyone had any sources or books that explains the concept and architect of designing a turn based strategy game or any turn based game.

View 2 Replies

Java :: Platform For Web-based Multi-player Game?

Sep 28, 2010

I'm developing a web-based fantasy football game. Most of the game is a straight-forward web application built on top of Linux/Apache/Php/MySQL.

I'm trying to figure out how to implement the draft application. The draft date and time will be scheduled in advance by each league's owner. Up to 32 users may be logged on for a given league's draft, and there is no limit to how many drafts may be happening concurrently. The users will take turns selecting players, and each user's turn will have a time limit. I'd like for all the users to be able to see whose turn it is, how much time that user has left to select a player, who they select, and which players are still available. If there are users in the league who are not logged in during the draft I'd like to be able to detect that and automatically assign players to them rather than waiting for the time to run out on their turn. Ideally I'd also like to have a chat window so the users could chat with one another during the draft.

My background is in desktop application development, so if necessary I could write server code in C#/.NET or Java. As far as I can see these are the options: PHP/AJAX - It seems like it would be possible to have all the state for the draft in the database and have the operations for the draft run in PHP triggered by requests from the clients? I guess in this case the draft doesn't start until at least one user logs in, and it seems like it would be a lot of polling requests to the server if I want everyone notified quickly when a user makes a selection.

[Code]...

View 2 Replies

Flash :: Web Development - Not To Target 10 For A Browser - Based Game?

Oct 25, 2010

There's clearly a bunch of new stuff in Flash 10, I'm seeing a bunch in the Graphics class so far. Struggling a bit to reconcile it with what I know already but it looks useful - render lists and 3D transforms, etc - however I wondered if there are good arguments for targeting Flash 9 since I can definitely manage without all the new stuff I don't know. Like support on non-Windows devices, wide adoption of Flash 9 Vs 10, etc.

View 1 Replies

Flash :: Make Based Game Without Graphic Skills?

Oct 29, 2010

If I have a designer make the necessary graphics, what do I need to learn to make a flash based game?

I already understand the backend server work that would need to talk to the 'front end' part of the game i.e. how the flash game will make requests to the backend servers for storing/retrieving data in xml/json etc.

View 3 Replies

Actionscript 3 :: Making Interesting Flash Based Game?

Mar 25, 2011

how to make a interesting flash based game?

View 1 Replies

Actionscript 3 :: Component Based Architecture In Game Development?

Oct 1, 2011

I have been thinking of trying out component based architecture for game development. I have read some blog posts and articles about it but I have a few things I have not sorted out yet. When I say component based I mean that you can add components to a ComponentManager that updates all components in its list. I want to try this to avoid getting classes that inherits variables and functions that they donīt need. I really like the idea of having an really simple entity class with a lot of components working side by side without getting bloated. Also, it is easy to remove and add functionality at runtime wich makes it really cool.

This is what I am aiming for.

// this is what the setup could be like
entity.componentManager.add(new RigidBody(3.0, 12.0));
entity.componentManager.add(new CrazyMagneticForce(3.0));
entity.componentManager.add(new DrunkAffection(42.0, 3.0));
// the game loop updates the component manager which updates all components
entity.componentManager.update(deltaTime);

Communication: Some of the components need to communicate with other components I canīt rely on the components to be self-sustaining. Sometime they will need to communicate with the other components.In Unity 3D, you can access the components using GetComponent().I was thinking of doing it like this, but what happens if you have two components of the same type? Maybe you get a Vector back.

var someComponent : RigidBody = _componentManager.getComponent(RigidBody);

Priority: Some components need to update before others

Some components need to update before others to get the correct data for the current game loop. I am thinking of adding a PRIORITY to each component, but I am not sure that this is enough. Unity uses LateUpdate and Update but maybe there is a way to get an even better control of the order of execution.

[URL]

View 1 Replies

ActionScript 3.0 :: Tile Based Game Depth Sorting?

Oct 1, 2007

I've been playing around with ActionScript 3. They have a new way of placing clips onto the stage, "addChild(clip)," which automatically places the clip onto the stage with it's own depth. So here's my problem, when making a tile based game, I have to constantly depth sort to make sure the object lower on the screen has the higher depth than an object higher on the screen. Pretty much, their depth depended on their y-coord. Does ActionScript 3 still let us play with depths?

View 2 Replies

ActionScript 3.0 :: Make A Multiplayer Hero-based RTS Game

Apr 12, 2011

I'm planning to make a multiplayer hero-based RTS game, similar to the gameplay of DotA/HoN/LoL. With about 10~ players max at once in a game. The latency and responsetime is key, trying to get as low ping as possible.And last but not least - I don't want to use any 3rd party solutions, such as smartfox server or any of the likes of it.So, with that said, what is the way to go if I'm going to build this properly? Java socket server? Python? Let me know what you think and please share resources since i haven't done anything similar before.

View 6 Replies

Multi User Game Programming?

May 24, 2010

If u have any tutorials, books or links related to this type of code, please forward me for this or my mail id - swamy.webdesigner at gmail.

View 1 Replies

ActionScript 2.0 :: A Mouse-focus Based Pause Function For A Game?

Mar 4, 2008

So your playing a flash game that's fast paced and mouse-based (hey that rhymes somewhat)... And then you accidentally move your mouse outside of the area of the swf... And then it pauses automatically with a "Continue" button, instead of you just dying or whatever. I've thought you could have a huge button the size of the stage and make it do something when the frame isn't 'mouseover' or whatever, but there's gotta be a better way. Also setting limits on the _xmouse and _ymouse wouldn't work cos sometimes the mouse moves too fast for them to accurately get the last mouseposition...

View 8 Replies

ActionScript 2.0 :: Only Show Button If User Gets To Certain Score

Mar 23, 2010

I have recently created a quiz that allows user to submit score to database, however I only want the submit button to be available if the user scores 100 % (all questions correct). This is the actionscript used on the final summary screen. is there a way to add to this? if userScore = 100 then display submit button, else leave blank.

Code:
userScore=(numOfQuestionsAnsweredCorrectly*100)/
(numOfQuestionsAnsweredIncorrectly+numOfQuestionsAnsweredCorrectly)
stop();

View 3 Replies







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