X-Tender
|
|
« Reply #20 on: September 02, 2008, 11:38:53 PM » |
|
2. How do I load sound that is inside flash cs3. I can load sound from an outside source ok but can't figure out how to do it locally. Thanks!
cant test it, but I'am pretty sure it is something like that: private var snd:Sound = new honyTonkSound(); private var channel:SoundChannel = new SoundChannel(); channel = snd.play();
honyTonkSound is the likage name of yoursound in the library...
|
|
|
Logged
|
|
|
|
Cagey
|
|
« Reply #21 on: September 03, 2008, 12:03:17 AM » |
|
Pendulo is a game I was working on a long time ago, but never bothered finishing the levels for. It shows off some pretty cool features like storing user data on the player's computers, using the player's clipboard, base64 compression and a level editor. I think it was integrated with MochiAds, but I'm not certain. There is also sound in there for those who need it. The only significant criticism i have with the code is the level loading is really not very elegant, but it does work. Be warned though; there may be some horible bits of code in there. I guess its worth saying that this is now public domain so feel free to use it however you wish. Flash CS3 is required to open the .fla file. A final note: there are a few files that mightn't be needed in the zip, but I included them anyway. Download here.
|
|
|
Logged
|
|
|
|
isaac
|
|
« Reply #22 on: September 03, 2008, 08:10:54 PM » |
|
Hey Cagey, it's good to look at your code... I always enjoy seeing other people's techniques and tricks.
So the purpose of base64 encoding is to convert the array into a plain text block that can be easily copied and pasted? I always assumed people were writing custom plain text encoders :D ... I may have to use this in the future.
|
|
|
Logged
|
|
|
|
cmspice
Level 1
|
|
« Reply #23 on: September 03, 2008, 08:54:45 PM » |
|
Hey, this is just what I needed. A straightforward ground up flash tutorial. I think it's finally time for me to learn some AS3. cheers .
|
|
|
Logged
|
|
|
|
cmspice
Level 1
|
|
« Reply #24 on: September 03, 2008, 09:41:56 PM » |
|
Dayum. AS3 is weird. I miss SDL already. So I have a quick question, are all these flash.____ import components part of flex3 or something?
Also, where would you suggest I go for tutorials after this. This was a great legup for getting started on AS3.
|
|
|
Logged
|
|
|
|
isaac
|
|
« Reply #25 on: September 03, 2008, 10:03:34 PM » |
|
these flash.____ import components part of flex3 or something? importing classes is a central part of AS3... without doing so you don't get access to anything other than the most basic number & string crunching tools. It's something you have to do across all AS3 environments. Also, where would you suggest I go for tutorials after this. This was a great legup for getting started on AS3. Decent guides on doing specific things in AS3 are usually only a google search away. What's hardest is getting the hang of the basics, which is why this tutorial is great! I used this set of tutorials when learning the basics: http://as3.metah.ch
|
|
|
Logged
|
|
|
|
Cagey
|
|
« Reply #26 on: September 04, 2008, 02:48:08 AM » |
|
Hey Cagey, it's good to look at your code... I always enjoy seeing other people's techniques and tricks.
So the purpose of base64 encoding is to convert the array into a plain text block that can be easily copied and pasted? I always assumed people were writing custom plain text encoders :D ... I may have to use this in the future.
Yeah looking at the base64 stuff now... I'm certain I could have used a little more trickery to make the strings a little shorter but it doesn't really matter. My favourite part is how it automatically puts the string in your clipboard when you finish the map. Glad you guys liked the tute. It appeared that not many people used it, so I hadn't been too enthusiastic about creating another, but maybe I will. If not, pendulo should be enough for now. For those who want books there isn't much I really recommend. As far as I know there is only one book on actionscript 3.0 focused on games programming and it's not that great. In my opinion the best way to learn is to try to make something, and if you don't know how to achieve something then google it. 8BitRocket has some nice AS3 games related stuff.
|
|
|
Logged
|
|
|
|
Don Andy
|
|
« Reply #27 on: September 22, 2008, 01:37:12 AM » |
|
I've finally found some time to tackle this awesome tutorial, and everything went pretty much smoothly so far, safe for one thing:
I can't get the debug flashplayer to actually debug. If I run your first code example, it well opens in the debug flasplayer, but that's about all that happens. I get a blank output in the actual player (as to be expected) but can find no way to display the debug output.
There is the debugger option (I think if you hit right-click->Debugger) but that leads me to a window where it wants to connect to a debugger, which doesn't seem to work.
|
|
|
Logged
|
|
|
|
Cagey
|
|
« Reply #28 on: September 22, 2008, 03:42:32 AM » |
|
I just had the same problem and it appears that updating to Beta 9 fixes everything. Hopefully you're not already running beta 9. If you are the only thing i can suggest is reinstalling it.
Good luck! Show us what you make :D
|
|
|
Logged
|
|
|
|
Don Andy
|
|
« Reply #29 on: September 22, 2008, 03:51:19 AM » |
|
I just had the same problem and it appears that updating to Beta 9 fixes everything. Hopefully you're not already running beta 9. If you are the only thing i can suggest is reinstalling it.
If you mean FlashDevelop, then yeah, I'm already running Beta 9 :T Could it be the Flex SDK, too? There was an Adobe and an Open Source download and I just went ahead and took the Adobe one. I also noticed that FlashDevelop takes really, really long to start up (it's basically locking up for a minute) and I have no idea if that's normal or not. I naturally updated to latest Java runtime before installing it. I'm gonna try reinstalling it though.
|
|
|
Logged
|
|
|
|
Hideous
|
|
« Reply #30 on: September 22, 2008, 03:57:56 AM » |
|
I actually have the full version of Flash CS3 (legally AND free! woohoo!), I'm guessing I can still follow this tutorial somehow?
|
|
|
Logged
|
|
|
|
Cagey
|
|
« Reply #31 on: September 22, 2008, 04:13:39 AM » |
|
My flashdevelop starts up pretty quick. When i was talking about updating, I was refering to flash develop. Odds are the flex SDK version doesn't make a huge difference. If you reinstall it and it still doesn't work, post here and i'll try find out why.
In regard to doing these tutorials in legal Flash CS3, i'm pretty certain all the code should work identically. How'd you get it free?
Edit: Since i'm almost on holidays, and there seems to be some more interest in this tute, i think ill write another. Any preference for subject-matter?
|
|
|
Logged
|
|
|
|
Hideous
|
|
« Reply #32 on: September 22, 2008, 04:16:58 AM » |
|
My school gave it to me, that's how.
|
|
|
Logged
|
|
|
|
Cagey
|
|
« Reply #33 on: September 22, 2008, 04:22:21 AM » |
|
Lucky man. That's lotsa moneys worth of Flash.
|
|
|
Logged
|
|
|
|
Don Andy
|
|
« Reply #34 on: September 22, 2008, 04:25:28 AM » |
|
Edit: Since i'm almost on holidays, and there seems to be some more interest in this tute, i think ill write another. Any preference for subject-matter?
Something that I've been wondering about working with FlashDevelop and Flex SDK is how to do the stuff you'd normally use the Flash IDE for (or that I WOULD have used the Flash IDE for) like managing the media library, or doing general layout stuff like a menu or something like that. Or art in general. If, say, I'd like to draw a basic character in Flash, compromised of a head, body, feet and hands (which are all balls, to keep it easy) and then do some simple animations for that to use in the game, is that even possible with the free combination, or would I eventually need the "real" Flash to do that? I know I could probably draw the Vector art in another free program (Inkscape?) if needed, but I dunno about the animation stuff. With the tutorial you wrote up there I'd manage to get the game logic working in no time, but I would've no idea on how to actually include some graphics from an external (or even internal) source. Edit: On a sidenote, I've just noticed you posted the source for your Pendulo game, and I've not looked into that, yet, to see if some of my questions are already answered in there, so sorry if they are :D
|
|
|
Logged
|
|
|
|
Cagey
|
|
« Reply #35 on: September 22, 2008, 04:35:09 AM » |
|
Yeah i definately intended to discuss importing assets in to a FlashDevelop project, but I just got lazy so that's going to be one of the first things i'll address. Pendulo is a good example of everything you need to make a game, but its in the Flash IDE and i was aiming to keep it all free. Or art in general. If, say, I'd like to draw a basic character in Flash, compromised of a head, body, feet and hands (which are all balls, to keep it easy) and then do some simple animations for that to use in the game, is that even possible with the free combination, or would I eventually need the "real" Flash to do that?
I know I could probably draw the Vector art in another free program (Inkscape?) if needed, but I dunno about the animation stuff.
Its definately possible to do what you describe for free, but whether you do it with vectors or bitmaps determines how complex you make it. The flash IDE is built around vector drawings and as a result anything related to them is relatively easy. In FlashDevelop it's far easier to stick with bitmaps but i can show you some examples of how you could do vector stuff if you'd really like.
|
|
|
Logged
|
|
|
|
Don Andy
|
|
« Reply #36 on: September 22, 2008, 04:41:51 AM » |
|
Its definately possible to do what you describe for free, but whether you do it with vectors or bitmaps determines how complex you make it. The flash IDE is built around vector drawings and as a result anything related to them is relatively easy. In FlashDevelop it's far easier to stick with bitmaps but i can show you some examples of how you could do vector stuff if you'd really like.
I'm way more comfortable with bitmaps anyway, but it's good to keep all options open :D Edit: Everything's working fine now after reinstall. FlashDevelop still takes obscenely long to start up, but other than that it works fine.
|
|
« Last Edit: September 22, 2008, 08:16:58 AM by Don Andy »
|
Logged
|
|
|
|
Don Andy
|
|
« Reply #37 on: October 05, 2008, 11:26:42 AM » |
|
Okay, after fiddling with it for a few days, what I found most difficult so far in retrospect (and still) is the transition from "normal" game logic to "flash" game logic.
Usually, if I go about making a game in its most simple form, I have the "main" function, do a loop in it, and then do all my game stuff in there.
Now, in Flash (with AS3) this seems to be entirely different and I just can't seem to figure it out. With the whole EventListeners and stuff. Most tutorials on the topic aren't really helpful either.
I'm almost considering to go with AS2, as there just doesn't seem to be any good beginner tutorials on game development with AS3.
|
|
|
Logged
|
|
|
|
Cagey
|
|
« Reply #38 on: October 05, 2008, 03:30:14 PM » |
|
Yeah I'm never satisfied with my game loops in flash. There are a couple of different ways to do it and they all have their own downsides. Creating an Optimized AS3 Game Timer LoopThis article may look a little complex, but its worth a read. I should get around to writing that Part 2... If you want, I can have a look at your code and I'll tell you what I would do differently. I'm almost considering to go with AS2, as there just doesn't seem to be any good beginner tutorials on game development with AS3.
Ack! But AS3 is so much nicer :D
|
|
|
Logged
|
|
|
|
Don Andy
|
|
« Reply #39 on: October 07, 2008, 02:30:34 PM » |
|
I think this should probably be moved into the Tutorial forum.
Also, I think I finally got the hang of it. Just made *click* after a while. Thanks for all the help and suggestions, Cagey.
|
|
|
Logged
|
|
|
|
|