Basic Flash app

From eyeOS Developers Wiki

Jump to: navigation, search

As it is quite easy to create flash-based applications for webOS, I was thinking of sharing some of my knowledge with all the people out there that want to create some more games. The following information will help you in creating a flash-based game by editing a template game which I created.

So let's get started by downloading the template http://steenbergen.homeip.net/FlashGameTemplate.tar.gz

Unpack this archive somewhere on your computer. It contains the following files/directory's; Code:

apps
apps/GAMENAME
apps/GAMENAME/app.eyecode
apps/GAMENAME/events.eyecode
apps/GAMENAME/info.xml
extern
extern/apps
extern/apps/eyeX
extern/apps/eyeX/themes
extern/apps/eyeX/themes/default
extern/apps/eyeX/themes/default/icons
extern/apps/eyeX/themes/default/icons/30x30
extern/apps/eyeX/themes/default/icons/60x60
extern/apps/GAMENAME

Lets start by renaming some directory's. In this example we will create a golden oldie game called pacman. Code:

rename: apps/GAMENAME
to: apps/pacman

rename: extern/apps/GAMENAME
to: extern/apps/pacman

OK now it is time to get the flash file into place. Put your flash file into the following directory and name it pacman.swf. Code:

extern/apps/pacman/pacman.swf

Now it is time to change the php code to get the game ready. As you maybe already noticed, i replaced all "GAMENAME" things into "pacman" i even gave the flashfile the same name. This is for the following reason. Open the following file; Code:

apps/GAMENAME/app.eyecode

Into your favorite editor and do a find / replace action; Code:

Replace: GAMENAME
into: pacman

Do exactly the same with; Code:

apps/GAMENAME/events.eyecode

Up to the last edit. Open the following file and replace all capitol words with the appropriate game information. Code:

apps/GAMENAME/info.xml

Last but not least we have to create a nice icon to put into the webOS default theme folder. Simple for creative people, the hardest job for most smile Anyway create a picture with a size of 60 pixels by 60 pixels and save it into the following directory (TIP create a screenshot of the game and resize it); Code:

extern/apps/eyeX/themes/default/icons/60x60

To prepared for the near futere when it will be easy to add shortcuts to the Dock Bar, resize the image to 30 pixels by 30 pixels and save it into this folder; Code:

extern/apps/eyeX/themes/default/icons/30x30

That's it. The game should be ready and playable. Next thing is to create an eyepackage file. Create a tar.gz file of the two top directory's; Code:

apps
extern

(TIP: For windows users download http://www.sph.sc.edu/comd/rorden/ezgz.zip this file, run the executable and drag and drop the two folder somewhere into the small window. Click yes and give a filename; "pacman")

To help you all out finding those great flash games try http://www.google.com/search?hl=en& … tnG=Search this link So let those games coming!! Post your creation in this topic so whe all can enjoy the game. ( lars-sh, maybe you can pick them up again to add them into your repository)

NOTE: Keep an eye on the copyrights. Play the game, if there is a clear copyright message don't post it here. Offcourse you are free to do what ever you want but posting copyright materials in forums like this can get the developers into trouble.

As an example of this HOWTO i used the game "pacman", so here it is. http://steenbergen.homeip.net/pacman.eyepackage


Originally post by j1nx http://forums.eyeos.org/viewtopic.php?id=1704

Personal tools