Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-19-2009, 09:45 AM   #1
Registered User
Join Date: Dec 2009
Posts: 2
Default [AS3] Flash Game Structure Question

Hi guys! Just a question about the structure for a flash game.....

In a simple flash game, we would have many interfaces, ie Main Menu, Pause Game menu, Tutorial page, Game Over screen and the main game engine itself.....how do you usually lay them out?

Do you have a "Main" class that contains all those interfaces and the game engine? Because thats what i usually do....but then there is this approach that places the screens on the timeline, which is easier to implement, but then it would just be like doing it all on the timeline, which isn't tidy. I've searched around but couldn't quite get a satisfactory answer to this.

Opinions please? thanks alot!
acidleaf is offline   Reply With Quote
Old 12-19-2009, 01:37 PM   #2
Mohammad Salesi
Join Date: Dec 2009
Location: iran-isfahan-pooladshahr
Posts: 5
Default my solution

hi acidleaf
i have my own solution for flash game and other flash project.

1-use helper.as for helper and common function declaration like move(mc:movieClip);
2-At first determine how level your game has ?
if it whill be played over web you can program every level in single swf file
and else every level in single scene .

3-write action in plank layer and set characters and other movieClips to other layer for example :
[global variable] is a layer in which variables has benn defined and whit any displayOBJ in it .
[hero] is a leyer too and my hero movie clip is in this layar and whit any actionScript code.

4-set comment for every function , global variable , and object like this :
var point:int = 0;
// use on : [heroActionCode]layer , [main]layer line 44
//modifie in : [enemy]layer line 25

this sample is for a global variable like points .

5-program evrey level completely and then perform graphics work

finaly work whit group in start and evry one think as hero or enemy
i mean that you program hero and your frind program enemy( be carfull : use difrent instance name and regard incapsulation )

i hope it was helpfull.
at the end
think about palestinan child . they whill kill for holocast which is hapened in europe
mralesi is offline   Reply With Quote
Old 12-20-2009, 01:03 AM   #3
Registered User
Join Date: Dec 2009
Posts: 2

thanks for the reply mralesi. may i ask you what other functions does your helper.as class has?

and you seem to be depending on alot of timeline code in your project?
acidleaf is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 08:33 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.