AS3 Calls to JavaScript

By Tommy Leung on 08/26/2008 in Games

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:

navigateToURL("javascript:FUNC()", "_self")

That’s it. :)


Sixx: A.M.

By Tommy Leung on 08/25/2008 in Life

I went to see Motley Crue this weekend–Saturday, August 23rd, 2008– at the PNC Bank Arts Center. The Crue put on a great show. I personally love the sexual images mixed in with the political messages. What I took away most from the show was from one of the opening bands: Sixx: A.M. I knew nothing about this band until I went to see the show. Trapt, Papa Roach, and Buckcheery also opened but, they didn’t leave quite the same impression. Sixx: A.M. is Nikki Sixx’s–of Motley Crue–band. They played some great music and I went to find some more when I got home. They are pretty awesome. If you’ve never listened to them before, go do it now. :)

Here is a taste of their 1st single: Life is Beautiful:

 




Tips for Developing Facebook Games

By Tommy Leung on 08/08/2008 in Games

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.

Continue reading…


Sheep Tycoon

By Tommy Leung on 08/08/2008 in Games



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! :)
 


Remember Xanga?

By Tommy Leung on 08/07/2008 in Life

A few years ago, Xanga was a really popular social Internet phenomenon. All my friends had one and were writing about their lives and what not. It was basically a blog network aimed at a younger market. I had stopped writing on Xanga since September of 2006 where I linked to a YouTube video of Keith Olbermann. I’m assuming I got a Facebook account sometime around there and forgot all about Xanga. I remembered it today and decided to take a look back at the things I wrote about–I can certainly tell that I was younger and dumber.

I’m not going to put a link to my old Xanga page but, you don’t need to be all that creative to figure it out. I read a few of my old posts and immediately noticed how I was just writing about my life and providing commentary on a few things here and there. While I have tried to write about real meaningful topics here, not many people really care to read it. The breadth of topics that I cover here is huge and that is just a bad marketing strategy.

Looking back at my old Xanga blog gave me an idea to write about my life again on this blog and then write my in depth political analysis and other topics in separate blogs. I had considered branching my political writings to a different blog a while ago since I was writing so much about that topic. There are a lot of things that I want to write about but then I don’t because it feels so disorganized here. I’ve already started to write about more personal things on this blog–that mixed with all the other topics is not helping to retain readers.

So, I’ve got a couple of blog names and ideas in mind–one of them will be political. From here on out, this blog will likely be updated a lot more, be a lot more casual, and a blog about the life of SuperTommy–not that I have tons of adoring fans but, I’m told that I’m fun to be around. :)