ActionScript 3.0 :: Memory Game - Match Two Different Colours?

Nov 21, 2011

This person created this game:http:[url]....i was wondering if i wanted to match two different colours, how could i do this? for example, instead of matching two reds, if i wanted to match a red and green, how is this done?

View 2 Replies


Similar Posts:


ActionScript 1/2 :: SlotMachine / Match Game Scoring

Sep 24, 2010

I 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?

View 1 Replies

Memory Leak In My Shooter Game?

Oct 20, 2011

I'm very new to flash,and have been digging through google and this site for information on how to piece together an AS2 shooter game.Its going well enough, but I'm having slowdown issues the longer the games runs, and I was hoping someone here could point me in the right direction.To paste an enemy movie clip on the screen, i'm using this:

Code:
var spawn =_root.attachMovie("monster1","monster1"+_root.getNextHighestDepth(),_root.getNextHighestDepth())[code]........

I need them stored in an array so that the player's shots can test weather or not they've hit any monster on the bullet's enter frame function, then call that monster's movie clip's take damage function. I'm using a for loop to do this:

Code:
for(var i in _root.player.foes){
if (this.hitTest(_root.player.foes[i])){
_root.player.foes[i].takedamage();}
}

I think the problem with the slowdown is that each time I place an enemy on the screen the array gets bigger and bigger. The slowdown only happens while the player is shooting, and I suspect the ever longer for loop with the hit testing is causing it.

I'm already removing the monster's movie clips as they get killed or exit the screen, I guess what I need is a way to reduce the size of the array at the same time, or at least tell the for loop not to do a hit test unless the monster is still alive.

View 3 Replies

IDE :: Random Sequence Memory Game?

Feb 24, 2009

I'm trying to create a random sequence memory game, where user has to watch over a certain sequence appears on the screen before they can input (by pushing buttons) according to the sequence appear before.I've found simon sayz code and make a modification on it.It worked flawlessly, but there is one problem with it.The code creates the sequence in this manner, e.g:

1
1 1 2
1 1 2 3
1 1 2 3 4
1 1 2 3 4 5
etc,..

while the game I'm intended to develop doesn't need that kind of increment logic, they just need to display 5 different element for starter and then the user should follow the sequence displayed on it.

View 2 Replies

ActionScript 3.0 :: Make A Color Memory Game?

Mar 1, 2010

I am trying to create a memory game, where about five or six (doesn't matter how much) different colours com up and flash for a second and disappear in a random order.

Then the user has to try to match them again buy clicking on the colours that they have infront of them in the same sequence as the lights went.

Is there a way to make this game so it will tell you when you are wrong or right, and also is it possible to make the flashing colours random each time you play it?

View 1 Replies

ActionScript 3.0 :: Memory Game Random Function?

Feb 11, 2010

I made a memory game with a tutorial. My knowledge of AS3 is not that good so I have to following question.There is a function like Math.Random to random generate number and put them on stage. I made a memory game and the cards are on the same place every time I play the "movie".I want them to shuffle every time I restart the game. How can I write a good random function in AS3?

View 10 Replies

ActionScript 3.0 :: Scroll Game Image Memory?

Apr 13, 2011

i am making a game with scrolling background. I am using a tiled background.inactionscript I was going to hide background objects off the screen but this cause memory to still be taken up by the hidden images so what do i do?the scrolling background isnt repeating so i could have 4-5 screens of image tiles off screen and made invisible until required.

View 1 Replies

ActionScript 3.0 :: How To Add Memory To Flash Game Or Movie

Mar 9, 2011

I may be tackling a huge subject here but I was wondering how to make it so that if someone uses one of my flash projects and they close it that it would remember where they left off. For example there are many Flash Games out there with levels, and instead of having to repeat each level over and over, the game remembers the level you left off at.

View 1 Replies

ActionScript 2.0 :: When Click 'Bone Memory' Game It Load Up Fine

May 7, 2004

The prblem that i have is that when i click the 'Bone Memory' game it load up fine. I can play the game and the 'Play Again' button work as well.The problem occurs when i use the 'Main Menu' button. It goes to the main screen, which is fine, but the 'duplicate' cards that were created for the game appear on this main screen when they shouldn't. This in turn causes problems with playing the game when the 'Bone Memory' button is selected for the second time. The cards are all in the wrong places.I am attching the file with the code. The main screen and game were created seperatly and i have tried to combine the in the file attched.

View 14 Replies

ActionScript 3.0 :: Game Slowing Down Everytime Reload Level / Memory Leak?

May 18, 2011

This is my first attempt at a game in AS3.I'm currently experiencing a problem which I'm sure is a result of my poor understanding of programming concepts.My problem is this, every time I call the function to rebuild my level, the game progressively slows down.I've tried to clear everything, but somehow something is still causing the slow down. I'll attach a zip with all of the files, and also I will add the main code to this.The attempted clearing happens in a function called cleanup() and the level setting up in setupLevel().[code]

View 2 Replies

ActionScript 3.0 :: Fix A Memory Leak At The End Of The Game A Bunch Of Sprites "explode" And Fly Around

May 8, 2010

i have an evil memory leak that i would like to fix. at the end of the game a bunch of sprites "explode" and fly around. once they leave the stage, i stop their enterframe loop and remove them like so:

[Code]...

View 7 Replies

Actionscript 3 :: Greensock LoaderMax Memory - Clean The Memory Which Been Occupied By The Previous Queue

Jan 31, 2012

I have a bit trouble with LoaderMax memory occupy, i have a queue, and i am keep loading images depend on user's action. if they click load more and it keep load, but i would like to clean the memory which been occupied by the previous queue (i have remove all the children been added by the loading previously). is there a way i can do it? the behavior like this.

[Code]...

View 1 Replies

ActionScript 3.0 :: Memory Monitor That Allows To See The Memory Leaked And Find Its Location?

Sep 26, 2010

I have an FPS monitor running and notice that I am getting choppiness here and there, bringing my game from 40 to 27 fps and back and forth at certain stages. I have an idea of where it is happening, but do not know for sure. I looked up quite a few memory monitors but haven't found anything decent yet. Is there a memory monitor that allows you to see the memory leaked and find its location? If not, how about just he memory leaked?

View 4 Replies

ActionScript 2.0 :: Memory Management - Take Less Memory For Scrolling

Aug 2, 2007

I'm making an isometric game and I need to know which takes less memory for scrolling, making everything invisible that you can't see? Like if(!this.base.hitTest(worldHitter))this._visible = false; Or would it be better to remove the movieclips unseen and then reattach them when i should see them?

View 2 Replies

Change Colours With Same Animation?

Oct 8, 2009

I have a washing mashine which turns gradually as an animation. But there will also be a colour swatch on the left hand side and when someone clicks on a different colour the machine is supposed to change to that colour. The problem is keeping the animation looping while having the buttons there.

View 1 Replies

IDE :: How To Tween The Changing Colours

May 8, 2003

Looking at the Changing Colors Using ActionScript tut. on the website, can any one tell how to tween the changing colours

View 14 Replies

ActionScript 2.0 :: Replace Colours In A .GIF?

May 5, 2005

i have an image in flash and i want to know if its possible with actionscript to replace some colors? say if i had an image with three colors: red, blue, and yellow i want flash to replace all the blue within the image to a certain color like orange without effecting the other colors of the image.

View 6 Replies

ActionScript 3.0 :: Change 2 Or 3 Colours Using Flash?

Sep 1, 2009

I am trying to create a website for a clothing company where the user can select different colours of clothing.
 
I can use one colour not a problem, but I will probably need 3 colours ie: shirt colour, collar colour, sleeve colour etc.
 
If I try to duplicate the script and change the instance and layer names but it makes it all go crazy.
 
Is there a way I can duplicate the scripts for each new section of colour or can I somehow tell it in the one script?

View 4 Replies

Actionscript 3 :: Replace Colours In A Movieclip?

Feb 8, 2010

I am trying to take a movieclip of a character and change the colour of their clothes. The character is comprised of vectors.

So far I have semi-sucessfully used this method:

stop the movieclip take the bitmap data from the current frame use threshold to replace the colour store the resulting bitmap data in an array add an onenterframe function - clear the current frame and add the bitmap data from the processed data in the array

So - this works pretty well. Each frame is only processed once at the beginning and then the write to the movieclip is very quick.

However! As the replacement is being performed on a bitmap there is an amount of aliasing that takes place to remove jaggies/pixelation. This produces colours that are not matched using threshold. So the main colour is replaced correctly but it is surrounded by a halo of mixed colours

View 1 Replies

ActionScript 3.0 :: Apply Two Different Colours To Text?

Sep 22, 2011

I have a text field that reads:"E 1-1"

can I apply two different colours to the text? "E" would be green, "1-1" would be black. Is it possible to do something like that through actionscript without creating two separate text fields?

View 4 Replies

ActionScript 2.0 :: Javascript Controlling Colours?

Dec 22, 2005

Is it possible to change the colour used in a flash movie for a shape using javascript Basically we have a little logo which appears on one of our e-commerce frameworks which is "skinnable" When we setup a skin for a client I would like to be able to send some colours to the flash movie so that our logo changes to match the sites colour scheme..

View 1 Replies

ActionScript 2.0 :: Generate Random Hex Colours?

Apr 22, 2006

is there a way to generate random hex colours using AS or do i need to define a set of hexs and then use a random var to determine which one is used?

View 6 Replies

IDE :: Imported Images Have Strange Colours?

Jul 30, 2009

I'm having some problems with importing images. (RGB jpegs)

When I import them, the colours, brightness and contract look totaly different.

I haven't got a clue what could cause this. And I really need to have the colours right.

View 2 Replies

Make A Very Simple Self-made Background With Different Colours?

Apr 10, 2010

I know that this might be a silly question but unfortunatly I can't figure out the answer for it! Well basically it's about getting a self-made background (or horizon) in an animation...THIS is a good example of the background I mean... Can someone please clarify to me how this is done? I tried the brush and bucket with different transparencies and strokes but I can't get it right

View 1 Replies

ActionScript 3.0 :: Using Threshold To Change Colours In A Bitmap

Nov 1, 2010

I'm trying to use threshold to change the colours in a bitmap image according to a lookup table. I've tried the following line of code to convert each colour to another, but without any luck:[code]

View 0 Replies

ActionScript 2.0 :: Controlling The Html Page Colours?

Oct 10, 2003

I came across this really nice effect: see how the html page changes colour (gradually!!)

[URL]

I presume it's js, but that's where my presuming stops

I'll post anything I find out about this

View 2 Replies

ActionScript 2.0 :: Get All Three Boxes To Change To Desired Colours?

Nov 10, 2004

Ive got a few plroblems with this project at the moment. Ive got the function to colour tween the shapes through actionscript. As you look through it seems ok but im trying to get all 3 boxes to change colour. Unfortunatley i can only get one to change. When looking at the functions called by the buttons the second box seems to take priority over the first one. How can i get all three boxes to change to my desired colours?URL...

View 5 Replies

ActionScript 2.0 :: Controlling The Html Page Colours

Oct 10, 2003

I came across this really nice effect: see how the html page changes colour (gradually!!) [URL] I presume it's js, but that's where my presuming stops I'll post anything I find out about this

View 2 Replies

ActionScript 3.0 :: Changing Random Colours Of A Sprite In A Loop

Jan 19, 2009

I am trying to create a loop that changes the colours of my dynamic vectors inside my sprite however I am not sure if I putt the following var names in the right place in the end of my statement attached or if i need another variable :[code]

View 5 Replies

Flex :: Charts - Create Stacked ColumnCharts With Different Colours?

Aug 6, 2010

I am trying to create a stacked column chart that will show three different values on a column with different colors.

View 1 Replies







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