Home Projects Flash CS3 How to Create a Tile Game Like Destruct-O-Match on Neopets.com - Linking the Tile class





Forgot your password?
Forgot your username?
No Account Yet? Create an account

Like it? Share it!

Add to: JBookmarks Add to: Facebook Add to: Windows Live Add to: Ximmy Add to: Digg Add to: Del.icoi.us Add to: Reddit Add to: Jumptags Add to: Upchuckr Add to: StumbleUpon Add to: Slashdot Add to: Netscape Add to: Yahoo Add to: Blogmarks Add to: Diigo Add to: Technorati Information

How to Create a Tile Game Like Destruct-O-Match on Neopets.com
How to Create a Tile Game Like Destruct-O-Match on Neopets.com - Linking the Tile class PDF Print E-mail
User Rating: / 2
PoorBest 
Projects - Flash CS3
Written by drooza   
Tuesday, 23 September 2008 19:02
Article Index
How to Create a Tile Game Like Destruct-O-Match on Neopets.com
Linking the Tile class
Creating the Tile Game Engine
Initializing Level Functions
In Game Functions
Clumping Functions
End Of Level / Game Functions
Creating the .fla
Let's Play the Game!
All Pages

 

Maybe too much to soak in? If so, go back up and read it again.  If you don't know what some of those things mean, there are plenty of sites out there that will help you further decipher the code.  But if you read it slowly then it's just like reading English!  Don't forget to read all the comments, it's pretty self explanatory.

 Now save this file as Tile.as in the same directory as our flash file. After we have to set the linkage for the library item named Tile in the flash file.  

Setting up linkage for Tile image

As you can see in the picture, there are several frames 1-6 with the last frame blank with a flag on it. This flag is "blank".  This could very well be redundant and left over from a previous method of removing the tile, but I digress.  Notice that there is the Tile object in the library with the object registration on the top left of the rectangle (at the coordinates (0, 0)).  Now on the library panel with Tile selected there's a small blue button with an italics i in the center next to the garbage can that brings up the symbol properties.  If the advanced button isn't already clicked, do so!  This will show the lower half of the Symbol Properties window where you can link a class to a library item.  Once you click Export for Actionscript, Class and Base class should automatically fill in.  At this point the we don't have to worry about the Tile object and class anymore, they are finished.



Comments
Add New Search
Bug Found
drooza (SAdministrator) 2008-09-23 19:59:00

There's this one bug that happens sparingly. Sometimes the tiles don't
fall into correct place and are stuck, suspended in the air. If I remove the
animation totally, then no more bug. I've got that much.

I'm thinking I have
to check where the tile is located when the animation stops.
Bug Fix:
drooza (SAdministrator) 2008-11-07 09:54:10

Because a tween object is instantiated inside an if statement (oops) the
garbage collector is taking care of business and removing the
tween before it completes.

By making this tween a part of the Tile
class, this may fix the problem.

Other fixes in the comments section
of this page: http://livedocs.adobe.com/flash/9.0/ActionScrip...
Losing?
KeenEyes (76.174.154.xxx) 2008-10-09 18:52:29

How do you lose in this game again? lol
drooza (SAdministrator) 2008-10-09 19:11:10

If you don't achieve the points set by the game for that level, you lose.
donald (119.154.16.xxx) 2010-02-15 23:47:27

thanks for your toturial....its really nice and mean full. I want to write
more but these days I am doing preparation of different
online certifications and I found ccna certification is the best helping source which is providing 100% authentic material. I
also spend my extra time in surfing internet, listening music
and playing games. After my exams I would like to join your group.
Write comment
Name:
Email:
 
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
:angry::0:confused::cheer:B)
:evil::silly::dry::lol::kiss:
:D:pinch::(:shock::X
:side::):P:unsure::woohoo:
:huh::whistle:;):s:!:
:?::idea::arrow:
Please input the anti-spam code that you can read in the image.

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated ( Saturday, 22 November 2008 13:05 )
 

Make a Donation!

Advertisement
Banner

HomeProjectsSnippetsContact Me

Copyright © 2008, Drooza.com