"I have never let my schooling interfere with my education." - Mark Twain

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


Share/Bookmark

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:

 




Share/Bookmark

The Georgian/Russian Truth

By Tommy Leung on 08/15/2008 in Politics

I put up a video at Tommy Liberty about a 12 year old girl who was in the area where the conflict between Georgia and Russia is occurring. She squarely places the blame on Georgia for attacking South Ossetia and causing all the death and destruction–she was actually thankful for the Russians. Watch it.



Knowing what we know, do we really want to get involved in this conflict? I’m saying that we should not put a base in Poland and send aid to Georgia.


Share/Bookmark

Tommy Liberty

By Tommy Leung on 08/14/2008 in Politics

Isn’t that catchy? Tommy Liberty. In line with mission to create focused blogs on topics that I like writing about, I have launched Tommy Liberty as the place where I will keep my political writings. I’ve also put a tab in the menu above alongside my fitness blog. :)


Share/Bookmark

Cold War 2.0?

By Tommy Leung on 08/11/2008 in Politics

A new Cold War is certainly an attention grabber and will sell news–that is why I titled this what I did. Hopefully, we don’t send troops over to Georgia in an attempt to defend them against the Russians. The news is reporting the situation as an invasion by Russia but, the reality is hardly as black and white.

You can read an in-depth look at what is really going on here. The main point is that Georgia invaded the “breakaway” province of South Ossetia where a lot of Russian citizens happen to reside. Russia used their military might in response to Georgia’s actions. It is hard to put the fault on Russia in this scenario as Russia is protecting its own citizens. We would expect our government to protected American citizens living in Mexico if certain danger were to arise–there is little difference in this case.

The media will try to make this out to be an aggressive action by Russia because that will sell the news. The only prudent move we can make is to stay out of the affairs of that area. We’ve already got our hands full with the Middle East and a weak economy at home. And besides, do our politicians really have the moral high ground to condemn Russia when we’ve invaded a country that did no harm to us?


Share/Bookmark

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.

(more…)


Share/Bookmark

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


Share/Bookmark