I don’t write nearly as much programming help posts than I could be. There seems to be so much of them out there as it is. However, when I come across something that I think isn’t all that well known or clearly discussed, I feel compelled to release that information into the great unknown of the Internet.
So, I was doing a project that needed a Flash movie–coded in AS3–to make some calls to JavaScript for functionality that JavaScript is more capable of doing. There are various FSCommands that you can use in ActionScript but, nothing really suited my needs. I had some JavaScript functions that needed to be called when certain things happened in the Flash movie.
The quickest method I found for doing this is simply using navigateToURL(). You simply make a call to javascript:FUNC()wth target of _self. More specifically:
The Facebook Platform has created a whole new market for online games and start ups such as the Social Games Network (SGN) and Zynga. I wrote about developing Facebook Applications a while ago as a overview of my experiences. Some of my apps are games and some are not–I’m a game developer so I prefer making games.
While going through my blog traffic data, I saw search terms specifically about developing games on Facebook. That leads me to believe that someone is looking for information about that. I have some of that knowledge to share!
I generally make games for Facebook using Flash and ActionScript. There really isn’t a good way to make really interactive games using web languages and Flash is fairly powerful for 2D casual game experiences. You can find a list of the Facebook games that I’ve made or had a hand in from my developing Facebook Applications article.
There are basically three real games on that list: FlipCup Challenge, Sam’s Solitaire, and Sheep Tycoon. Sheep Tycoon is by far the prettiest because there was a real artist on that project–the other two I just slapped some art together to get the game out quickly. I’m not really an artist.
I had did some of the programming on this game for Facebook and now we’ve made a version of the game available for the general internet. The high scores for this version of the Facebook version will be different. I happen to hold the highest score on this version and the second highest on the Facebook version as I write this. Play it! :)
Â
I’ve been working with ActionScript 3 a little bit more as of late and one rather confusing problem that seems to come up often is one with KeyboardEvent–it doesn’t seem to always work. The solution that I’ve come up with is to always add the KeyboardEvent listener to the stage of the root.
So, you will want to use addEventListener in the main class:
And that’s it! This way has worked well for me so far. I actually use a KeyManager class to initialize the events and the stage is passed to that class.
Due to popular demand, I will spill the beans on the cheats for Cul De Sac Smash 2: Wheels of Fury on Cartoon Network. I was the programmer on that game and I’ve noticed a lot of traffic coming to this blog from searches for Wheels of Fury cheats. There are actually not that many cheats in the game, I had already given one away in an earlier post There are basically 3 cheats in the entire game. You can get to them by pressing the ESC key.
First cheat: “JACKPOT”
This cheat gives you free money. You can use it as many times as you like.
Second cheat: “WHEELIE”
This cheat will unlock all the levels in the game.
Third cheat: “ARMOR”
You’ll become invincible with this cheat.