May
21
2008
This is an old Application i did sometime during July – Sept 2004. Here is the link to it,http://www.nayansavla.com/tilepainter/
You can selected the tiles from the drop down menu on the left and then paint them, layout will allow you to rotate the tiles etc.
I don’t have it connected to the php backend which allows to save and retrieve your work.
May
20
2008
In AS 2.0 or earlier when you use getURL to open up a new browser window, usually it wouldn’t get blocked by popups if the getURL call was made onRelease event instead of onPress. But with navigateToURL introduced in AS 3.0 its a different story altogether.
navigateToURL works fine with Safari but doesn’t work in Firefox (I am a mac user so i personally test in these two browsers). Anyway to make sure that popups open we have to use some javascript and call it from our Flash.
Adobe recommends we use ExternalInterface since the 9.0.124 update. So here is my Flash code,
var boolean:String = ExternalInterface.call("openWindow", url);
if (boolean == "false"){
navigateToURL(new URLRequest(url),"_blank");
}
and my Javascript would look something like this,
function openWindow(pageUrl) {
var winName = Math.round(9999*Math.random()) + new Date().getTime();
var winNew = window.open(pageUrl,winName,"toolbar=1,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=1,width=800,height=700,left=200,top=100");
if(!winNew) {
return "false";
} else {
return "true";
}
}
So with this method we first try to open a window using Javascript, Firefox is happy with that and hence it returns true and flash doesn’t make a call to navigateToUrl. Safari blocks the javascript popup and hence true is returned to Flash and using navigateToUrl you can open up a new browser window.
It seems to work with IE as well otherwise i would have got a bug reported from the QA team.
May
13
2008
Brainvita was the first game i created in Flash and it was done sometime in early 2000 using Flash 4. I vividly remember how the only programming that could be done is using drop down menus.
I lost the source code for it when a Linux installation attempt went bad and i lost all the data. I had backup of the swf file but then it had this annoying music which wasn’t fun.
I then decided to re-create it in Flex and here it is. I need to work on the graphics and add more functionality to make it a nice Facebook application.
The rules for this game are outlined here. http://en.wikipedia.org/wiki/Peg_solitaire