View Full Version : A few questions on exporting from flash!
bluemagica
November 17th, 2008, 10:36 AM
For record, I have flash cs3/as3 and I need to make my game available for download, so here are my questions!
1) How do i make customisable gamepad/joystick support?
2) How can i publish for mac and linux? Note: I know the swf runs on players of both, but since i am providing for download, i prefer not to give direct swf!
3) How can I make my game's window resizable, or what will be the best way to take the game to fullscreen without loosing graphics quality?
4) For downloaded games, what is the best approach to create a highscore list, or data that persists between sessions?
5) Can I publish for consoles too? Which and How?
PS: the game is in as3|| I need to make it downloadble/playable on as many different platforms as possible|| The game in windowed mode is around 400x400
SparK_BR
November 17th, 2008, 01:28 PM
use fscommand
fscommand are a command library to the container of your movie(the browser or the flash player)
fscommand("fullscreen", true); makes fullscreen as flash works with vectors then you won't loose quality
go to "file > publish settings" and say you want to make a .exe and a .hqx and others you might want
use some kind of javascript to see which browser and operating system the user has,
google for "javascript system detection"
then when it clicks the download button you check the system and link for the correct file
therobot
November 17th, 2008, 09:57 PM
You can detect the os using flash.system.Capabilities.os
If you're going to run the game fullscreen, off the top of my head, you want to do something like
stage.StageDisplayState = StageDisplayState.FULL_SCREEN;// this may be wrong, I can't remember it exactly. just google as3 fullscreen
And you'll add event listeners for when the stage goes fullscreen, or just more generally when it resizes. If you're concerned about graphical degradation as the screen size changes, consider going with a liquid layout - Just consider what sorts of things in your game you can scale, and what sorts of elements would take a fixed position, or would be moved relative to other things. The best example I can give for something like this is webpages. Consider how all the divs behave and the properties they have (position:absolute, relative, etc...width:100%, width:50%, etc).
If you want to go cross platform downloadable, look into Adobe Air. You'll be able to take your swf and make it into a stand-alone desktop application. If you want to publish on consoles, you could make something for the wii and run it through the opera browser on the wii, though I know that's not what you're looking for (and you're limited to Flash Player 7 there).
Last, if you want to do a highscore board, you probably just want to stick with php.
bluemagica
November 17th, 2008, 11:34 PM
Thanks to both of you! but my questions still remain:
1) I need to know how to deal with joystick/gamepad through flash? I mean for keyboard and mouse i can use simple listener to get their states, but what about joysticks?
2) My problem is not making the game fullscreen but making the game window "resizable" properly, i mean drag the corner of the window to actually resize it proportionally!
3) About the graphics quality, I am worried, cause all the graphics are pixel based like old DOS games, so there isn't many options to scale certain parts and leave others intact.
4) I am talking about highscores on the client-side, for the client himself, so I don't see why and how will i use php here!
lastly, I have never ever used air, I will need some guidance other than adobe's help/getting started guide!
therobot
November 18th, 2008, 08:24 AM
1) I need to know how to deal with joystick/gamepad through flash? I mean for keyboard and mouse i can use simple listener to get their states, but what about joysticks?
Not too sure about this one. Google yielded this http://www.flashjester.com/?section=faq&cPath=14_66
but I didn't really take a good look at it. You could probably find some programming language that does support gamepads and joysticks, then it's just a matter of interfacing that language with flash to tell it like oh a button is pressed, etc.
2) My problem is not making the game fullscreen but making the game window "resizable" properly, i mean drag the corner of the window to actually resize it proportionally!
I think the same technique applies, you have a listener waiting for a resize event, you set the stage not to scale, and then you have to pick and choose what you want to happen when the resize event occurs.
3) About the graphics quality, I am worried, cause all the graphics are pixel based like old DOS games, so there isn't many options to scale certain parts and leave others intact.
right, well you'll have to be creative about this :) consider maybe using vectors for background elements? Ideally, you wouldn't want to be stretching your bitmaps, so you'll have your bitmaps stay at 100%, and you'd probably have to find other things to scale. worst case, just leave your game intact in a container clip, and let the container clip scale up. Add a bg to the container clip, like a repeating pattern.
4) I am talking about highscores on the client-side, for the client himself, so I don't see why and how will i use php here!
oh ok...umm. yeah you want to look at local shared objects
lastly, I have never ever used air, I will need some guidance other than adobe's help/getting started guide!
SparK_BR
November 18th, 2008, 09:53 AM
i remember something like swf studio... something like that, i can't remember the name, but it has an extended fscommand you could use in the game and then when you export using the program it could even change the window theme of your game
joystick support, window transparency, and etc...
@therobot, the o.s. detection must be in browser, then the user will download the right executable of the game
bluemagica
November 18th, 2008, 11:04 AM
err, the exact name of the tool for that would be really helpful...so please try to remember it harder!
I will give you a cookie ;)
EDIT: I googled swf studio, but it dosen't seem to say anything about supporting joystick, and besides, it supports uptill MX2004, or as2, so i can't use that! I think swfKit will be a better option, but am still not sure!
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.