So I've been trying to learn a few languages this summer and ended up learning all the basics and nothing really in depth. I decided I needed to make something worthwhile.
One of my main interests is playing games so I thought why not make a game? I see lots on the Internet games based in Flash so I thought that would be my best starting point to make actual graphic based games... (not to mention I actually got taught at university how to use flash to a certain extent).
The game I decided upon was tetris. I'm sure you're all familiar with the block based puzzle game and might be able to shed some light upon what I am doing right and what I am doing wrong.
So, I've firstly made my game screen with a window for all the blocks to come down in. I've also put some dynamic text place holders ready for when I come to keeping track of how many 'lines' the player has scored, the time and so on in the right hand side of the screen.
I have made graphics for the different colour 'building blocks' (just one block of 24x24 in different colours for each shape) and then used the 'building blocks' multiple times to create my shapes (I, J, L, O, S, T, Z). These blocks are called tetrominoes.
Now I've come to a point where I need to import these tetrominoes randomly from the library and get them to appear in the middle just off the top of my block screen.
That is my first question and Google provides no answers:
How do I import random objects from a particular folder in my library to the stage in Flash CS5 AS3?
So, that's my first question...
After realising a quick solution to my problem was not to be found quickly I then thought about what will happen to this block once it has been imported... Well, in Tetris the block moves slowly down until it hits another block or the bottom of the block screen.
I know that I can do something with a detectHit() function so before I ask for help on that I will experiment myself (which requires the above part of my game to work first) but my second question for this post is:
How do I get my block to move down the screen by a set amount of pixels every second or so?
Thanks in advanced for any help you may be able to provide...
