using an if-statement.
1 person found this helpful
The first thing you should realize is that the design uses AS3 code, and you are asking in the AS2 forum. So if you plan to use AS2, you should find a different tutorial.
As far as making it match green to red, you would have to first understand how this design works so that you can think thru how to redesign it to work that way. As is, this design assigns two tiles to match based on assigning numbers to them from an array of numeric pairs, and those numbers are used to tell the tile which color frame they belong to. So the current design won't fit your desires very well since the numbers relate to frame numbers and the colors in those frames
To try to use this as a starting point following a similar design approach, one possible approach is to build two separate types of tiles where frame one of one tile-type is red and frame 1 of the other tile-type is green, and so on for the rest of the frames. THen you need to work out how to get an equal number of each type of tile assigned to a unique number value from and array that only has single values instead of pairs.
In any case, as already mentioned, it is most important that you understand how the current design works before you try to think about how to change it.
Hi, sorry about posting it in the wrong section, i did not realise, i am pretty new to all this and AS3 is what i am going to use.
I can see what your saying and thats what ive been trying to do but i don't think my apporach is working. When you say create two titles and match them together how can this be done? Is this done by creating a new layer of tiles and linking them together?
As I said, you need to gain an understanding of how the version you have works. So study the tutorial thorughly. It is matching soley based on a number assigned to each tile. Tiles with the same number assigned to them will match. Those numbers just happen to correspond to a frame that has a particular color square in it.
If you have very little experience with Actionscript, this is likely to be a little too advanced for you to grasp. In any case, if you intend to continue with this as an AS3 design, you should post any further questions in the correct forum.