Actionscript 3.0 :: Bonus Time In Game

Jun 25, 2010

if my timer is Code: Select allvar count:Number = 60;

var myTimer:Timer = new Timer(1000,count);
myTimer.addEventListener(TimerEvent.TIMER, countdown);
myTimer.start();[code]...........

on each good click(on specific movieclip) to add (exc. 3)secounds to timer, and if wrong(other movieclips) to take (exc. 3)secounds of timer.I've tryed, (count+=3); but when i wait to time counts up, it stays on 3, without changing ...

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Tracking Time - Count The Seconds Passed While Playing The Game And Gives A Bonus Multiplier To The Current Score When The Game Ends?

Mar 15, 2009

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

ActionScript 1/2 :: Bonus Points Through A Collision?

Aug 19, 2010

I have a score system on one of my games, and it involves a dynamic textbox with a bonus system. I want to make it so that when my main character and special objects collide, bonus score is added.This is my code for my scorelayer, instance name of scorebox is (score_txt)
 
[code]...
 
There was a bonus code for it but I removed it because I couldn't get it to work with collisions. All enemies/powerups spawn in the middle of the game so they don't have instance names (so I can't do a hittest between my main character (instance name: Thedude) and any enemies (No instance name) )I can do collision test by putting codes in the spawning thing's .as file, that way I can make a collision code without having both parties needing an instance name, but I have no bonus score code to work with. The one I used on my score layer does not work if put in a character's .as file.

View 7 Replies

ActionScript 2.0 :: Rhamej Xml Gallery With Bonus Thumbnails?

Mar 9, 2008

I'm trying to combine rhame's xml gallery with stringy's thumbnail bonus code.In short when i click a thumb excpet from the large main image i want to get buttons 1 2 3 4 for bonus images.Ok i managed to get the bonus from the first image to display.But when i click the next thumb bonus disappear and even on the first image are not showing anymore. I have temporarily disabled the mask so i can see whats going on. I believe it has to do something with the bonusarray[i] it doesnt seem to listen after the first ones. I mean the mask is scaling and working.here is the actionscript and in red the script i think its the problem:

Code:
scroller.InstanceName_1._alpha += 100;
stop();

[code].....

View 8 Replies

ActionScript 2.0 :: Time Limit In A Game - Movie Clip That Says "Time Is Up!" Will Be Displayed?

Jan 22, 2009

Setting up a time limit that if the time equals to 3 minutes the game stop.I have a card game with 10 different cards to be paired. My problem is to put a timer that limit the player to only 3 minutes of playing after which a movie clip that says "Time is up!" will be displayed.

View 2 Replies

ActionScript 3.0 :: Load One Game Level At A Time?

Jan 12, 2012

I have seen in some games where instead of loading the whole game at the beginning of the game, they load one level, with the preloader on the screen, then when that level is over, another level is loaded, with the preloader on the screen, etc. I've been trying to find a tutorial or some information on how to do this online but couldn't find anything. I have a game that takes a long time to load when loading it all at the beginning of the game, so I'd like to load it level by level.

View 7 Replies

ActionScript 3.0 :: Uploading Name And Game Time To Twitter?

Apr 5, 2012

Still working on a series of games and ran into a problem with uploading from AS3 to Twitter.What I want to happen is the player enters their name at the start of the game. When the player completes the game their time and name are sent to Twitter to be posted. The code for the timer handler:

Code:
function TimerHandler(e:TimerEvent):void{
var TotalCounts:uint = MyTimer.currentCount+penalty*10;

[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

Actionscript 3 :: Game Starts Countdown By Server Time?

Dec 9, 2011

i have a game and when a player clicks play button a countdown starts and game begins when count hits zero,Problem is it counts from the Os/Computer time and their is a difference in secconds from computer to computer causing players to start at differnt times.Is it possible to have the countdown count down by server time to keep players in sync so everyone starts at the same time?Code is writen in actionscript3.0 and Flash cs5.5the code provided currently counts down by remaining Os sec's of the current min so if theirs 30 sec left in the current min it countsdown 30 sectime1 in my database is 60 for 60 sec between games

var timer4:Timer = new Timer(1000);
timer4.addEventListener(TimerEvent.TIMER, tick4);
timer4.start();

[code]....

View 1 Replies

Haxe/Flash Game Loop Slow Down Over Time?

Mar 29, 2012

I have a game loop written in Haxe/Flash. For some reason it slows down over time. At first it runs reasonably, but my laptop fan starts spinning up and it gets slower and slower. Why would this happen?

import flash.display.StageDisplayState;
import flash.display.StageScaleMode;
import flash.display.MovieClip;

[code].....

View 1 Replies

ActionScript 2.0 :: How To Make Game Play Time Counter

Mar 31, 2005

How to make a gameplay time counter? I did make one but it only showed seconds and miliseconds (with gettimer())). As soon as the player hit the button "submit" the time has to start to count. As the player reached his maximum turns the game goed to the next frame and the timer should top. The game starts over (from frame2) so the timer has to begin over again.

View 4 Replies

ActionScript 2.0 :: Loading Game Second Time Doesn't Work

Feb 1, 2007

I have built this AS2 game that uses quite a few classes and library symbols.It works fine the first time you play the swf. But if you try to do the whole ctrl + ENTER in the Flash IDE, it doesn't seem to load any of the assets that are dynamically attached to the stage.This also happens if you have another swf use loadMovie to load it.I have all the dynamically attached symbols assigned with the linkage and set to export on the firstFrame. There is an include .as file on the first frame of the fla.

View 3 Replies

ActionScript 3.0 :: Flash - Adding Time To A Game Timer?

Mar 21, 2011

've created a simple flash game for moving a car round the flame to collect fuel cans and avoid traffic cones. The game has a 10sec timer running but i want to make it that if u hit a fuel can it adds 5secs to the timer and if u hit a cone it removes 2secs.This is my code so far

var fuelpoints = 0;
var conepoints = 0;
startButton.visible = true;

[code]....

View 1 Replies

ActionScript 3.0 :: Create A Game Similar To All The Reaction Time Games?

Oct 25, 2009

I want to create a game similar to all the reaction time games out there, with the difference that my game has a set amount of time that you as the player will have to guess when it occurs (with a simple click). Each player has a number of tries where the closest time from the set time wins.

View 1 Replies

PHP :: Flash Browser Game - Real Time Data Exchange

Feb 16, 2011

I am developing a non-real time browser RPG game (think Kingdom of Loathing) which would be played from within a Flash app. At first I just wanted to make the communication with server using simply URLLoader to tell PHP what I am doing, and using $_SESSION to store data needed in-between request. I wonder if it wouldn't be better to base it on a socket connection, an app residing on a server written in Java or Python.

The problem is I have never ever written such an app so I have no idea how much I'd have to "shift" my thoughts from simple responding do request (like PHP) to continuously working application. I won't hide I am also concerned about the memory and CPU usage of such Server app, when for example there would be hundreds of users connected. I've done some research. So, considering the fact I don't need real time data exchange, will it be wise to develop the server side part as socket server, not in plain ol' PHP?

View 1 Replies

Actionscript 3 :: Game Timer Not Calculating Start Time Properly?

Jun 22, 2011

The game is like Asteroids where four rocks are placed in the corners of the stage at the beginning and then start moving randomly around the stage. The problem is the timer used is started the moment that the flash file starts not the moment the player clicks the start button. So if you are on the start screen for 5 seconds before you click play when the game actually begins the rocks are where they would be after 5 seconds of play, which could be right over the player.

package {
import flash.display.*;
import flash.events.*;

[Code]....

View 2 Replies

ActionScript 3.0 :: Have A Countdown Timer So All Users Enter The Game At The Same Time

Sep 17, 2010

my question is what is the best way to have a countdown timer so all users enter the game at the same time. At the moment i am using php to get the time from mysql database and send it to flash, but the time is different for each user, would the best way getting the time from the server. this is the code i am using at the moment.

as3 code

ActionScript Code:
var load:URLRequest = new URLRequest("lobby.php");
load.method = URLRequestMethod.GET;

[Code].....

View 6 Replies

ActionScript 2.0 :: SetInterval Function - Setting Time Limit In Game App

Feb 9, 2009

I have problem with the setInterval function. I have a game application that sets a time limit of 3 minutes. From 3 minutes counting down by 1 second up to zero. The problem is, the counting of the timer is by 2 seconds and sometimes by 4 seconds. I tested the movie in my local computer and looks fine but when I upload it to a server and it is embeded in a website. And by the time the user clicks the link to play the game application and starts playing the problem about the timer occurs.

View 6 Replies

IDE :: Craps Game - Get A Lot Of Time Constant Errors And Unexpected Else Statements?

Jan 16, 2010

i'm trying to make a craps game in flash.The program starts with a login screen which takes you to a menu, then you get the choice of 3 games. I'm on my second game so far which i'm having trouble with.So far i've managed to get 2 spinners with numbers 1-6 on each, which will spin, give you the values in 2 separate text boxes then add the value together in another text box.The trouble i am having is the winning and lossing condions, where i have no idea where to start.

Rulse are if your value equals 7 or 11 you win

if your value equals 2,3 or 12, yoo lose and

if your value is anothing else then user gets another go and has to get the same value again or get a 7 and lose.

Heres code so far:

import fl.transitions.Tween;
import fl.transitions.TweenEvent;[code]....

i need to create another function or create if statements within existing functions.I tried creating another function afte the bottom function but got a lot of time constant errors and unexpected else statements whihc i didn't understand.

View 2 Replies

ActionScript 3.0 :: Flash New Game - Make Ball Get Larger Each Time?

Jul 22, 2010

//stop on current frame
stop();
//ball follows mouse[code]....

What I am trying to achieve is to make my ball get larger each time it collects a particle (Pixel).

View 1 Replies

ActionScript 3.0 :: Make A Simple Game Loop Using Delta Time?

Jan 14, 2012

I have looked everywhere for an example or tutorial on a delta time game loop in AS3. I found many fixed time step examples but very little helpful information on delta time game loops and how it works. I have seen examples that do the calculations in a timer and also seen examples that do the calculations inside the enter_frame event. All the examples I have seen are also incomplete and only provided me with bits and pieces.

View 3 Replies

ActionScript 2.0 :: Trivia Game - Flash Fade Out One Wrong Answer At A Time?

Mar 28, 2007

I am having a problem with a little trivia game that I am in the process of developing. What I am trying to do is have flash fade out one wrong answer at a time. All questions are being pulled from an XML file that has hundreds of questions. Keep in mind that the correct answer will not always be in the same spot. I also have it so that one question fades into another after a specific time. Here is the code

Code:
System.useCodepage = true;
//
function loadXML(loaded) {[code].....

View 8 Replies

Actionscript 3 :: Game Development - Embed External Data Files For Run-time Retrieval?

Jul 30, 2011

I'm writing a Flash game where the game levels are saved in small plain-text files, which I want to embed in the swf file. My current solution has a distinct code smell in its repetition, and I'm certain that there is a better way. My code is basically: In a LevelLoader class, embed all the levels

[Embed( source="levels/1.dat", mimeType="application/octet-stream" )]
protected var level1:Class;
[Embed( source="levels/2.dat", mimeType="application/octet-stream" )][code].......

There are a couple of problems with this approach: I have to add a line for embedding each level. Optimally, all files in a folder would be automatically embedded.A level can't be "prepared" from a string. I'd like to be able to pass LevelLoader a level number or level name as a string.I think that all strings are stored in memory rather than on disk.How could I program this "correctly"?

View 1 Replies

ActionScript 2.0 :: Store A Simple Cookie That Will Remember The Score For The Next Time The User Plays The Game?

May 6, 2007

I'm just trying to store a simple cookie that will remember the score for the next time the user plays the game (the score governs if an option is visible or not)It all works fine until I close browser/reload the page, at which point the shared object seems to disappear, any clues?

Write:

Code:
var rem_score:SharedObject = SharedObject.getLocal("score");
rem_score.data.score = new Number(score);
rem_score.flush();

The problem prolly lies in my write code but ill post the reading aswell just incase there is a problem with that too

Code:
var rem_score:SharedObject = SharedObject.getLocal("score");
if (rem_score.data.score != undefined) {
this.remdscore = rem_score.data.score;
if (rem_score.data.score >=30) {

[code]...

There is another point it is read but it is the same sort of thing as the above.

View 1 Replies

Professional :: Prevent User Open / Play Flash Game On Multiple Browser Windows At One Time?

Mar 12, 2012

I made a game as the same site URL..Anyone knows how to prevent user open and play game on multiple browser windows at a time?I used flash control to embed flash into aspx page and connect to sql server

View 4 Replies

Professional :: Flash Game - Symbol 'levelcomplete'1046: Type Was Not Found Or Was Not A Compile-time Constant: NextlevelBtn

Jan 22, 2012

Now getting this error: Symbol 'levelcomplete'1046: Type was not found or was not a compile-time constant: nextlevelBtn. Hi guys, Beginner here having some trouble creating my first flash drag and drop jigsaw puzzle game. The drag and drop jigsaw puzzle works to some extent, but it is the "level complete" movieclip which is causing problems. On testing the movie i get this error:1061: Call to a possibly undefined method addEventListener through a reference with static type Class.

[Code]...

View 3 Replies

Android :: Cross Platform Game - IOS : Develop A Very Simple Game For Iphone/ipad?

Mar 7, 2012

I am going to develop a very simple game for android and for iphone/ipad I have the option to develop it in cocos2d or in adobe flash air (i am not a developer, but i have 2 developers who are offering me the service)I have a developer that states that cocos2d is better and other one that states that adobe flash air.I want it in cross platform.the cost offered by both developers is the same..i have heard that adobe air has the flaw that it is very slow, is this real? if you had the 2 options which will you use to develop your game and why?

View 1 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 3.0 :: Making Game And Objects Would Spawn At Random And Be Able To Click But When De Game Starts Itself

Jul 4, 2010

currently i making this game and objects would spawn at random and be able to click but when de game starts itself, the spawn is correct but i am unable to make it stop when time goes to 0seconds.

View 1 Replies

ActionScript 3.0 :: Flash - Writing A Simple Game Rule For A Platform Game?

Feb 28, 2011

I'm creating a game at the moment for my university course and it involves the player character jumping on top of boxs twice to break them as opposed to just once.What would be the most efficient/simple way of writing this in Actionscript 3.

View 1 Replies







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