Saturday, October 07, 2006

code Search - google / Krugle ?

Google launched their codeSearch tool(http://google.com/codesearch) yesterday. And it doesn't know that there is a language called 'Actionscript' ?

Krugle(http://www.krugle.com) knows Actionscript. And I like what they have done for the UI as well.

How do you "code search" ? Google / Krugle ?

Monday, October 02, 2006

Full-time / Part-time flash developers required in Bangalore, India

A friend of mine is looking for a flash developers to work with them for Attomic Labs (http://www.attomiclabs.com/), either part-time or full-time.

The expected skillset includes:

Atleast a couple of years of RIA development experience in AS2.0 using OOP methodologies
Working Knowledge of XML
Should be a good team player
Understanding of AS1.0, Flash components-V1 & V2
and good communication skills, of course.

Component development experience in AS2.0 experience would be greatly appreciated.

If you feel that you have the above mentioned skills, please mail me your CV at [arulprasad at gmail dot com], and lets talk.

They are setting up a office in Bangalore, so candidates applying for a full-time position should ideally be willing to re-locate to Bangalore (if not currently in Bangalore, that is). Remote involvement is possible, for successful part-time candidates.

Monday, July 24, 2006

Showing list of fonts in a Flash V2 comboBox formatted with the corresponding fonts

I was browsing the actionscript.org forums today and found a query by a user. It read "I have a combobox full of font names. I was thinking that it would be pretty cool to have the actual font format show in the label as well. ...."

I had a lil free time and thought I'd give it a shot.

This is what you need to do:

1. Drag a comboBox component from the components Panel to your FLA's Library.

2. Add the following code:


/* --------------------------- code starts here --------------------------- */
import mx.controls.ComboBox;
var myCB:ComboBox;

function init ()
{
myCB = ComboBox(createClassObject(ComboBox,"myCB", this.getNextHighestDepth()));
myCB.setSize(175,22);
myCB.rowCount = 7;
myCB.dataProvider = TextField.getFontList ();
myCB.open ();
myCB.addEventListener ("change", function ()
{
myCB.textField.setStyle ("fontFamily", myCB.value);
});
myCB.addEventListener ("load", setCBListFonts);
myCB.addEventListener ("scroll", setCBListFonts);
}
function setCBListFonts ()
{
for (var i in myCB.dropdown.listContent)
{
var _tf:TextFormat = myCB.dropdown.listContent[i].cell.getTextFormat ();
_tf.font = myCB.dropdown.listContent[i].cell.text;
myCB.dropdown.listContent[i].cell.setTextFormat (_tf);
}
}

init();
/* --------------------------- code ends here --------------------------- */


3. Test Movie, and you should be done!

This is how the final SWF looks: (If SWF doesnt show up below,check it out here
)



Tuesday, July 18, 2006

[OT] : blogspot.com, typepad.com, geocities.com banned in India!

I had been wondering why a few of my favourite blogs were not accessible today morning. And only by evening(when a friend of mine told over chat) did I know that my blog was blocked too! I figured out the govt of India had asked the ISPs to block a few blogs because they were supposed to have 'objectionable content'. Wonder if they mistook me when I said i'm a flasher ;o)

On a serious note, I'm pretty seriously pissed off!

More info here.

Meanwhile someone let me know about this site:http://www.pkblogs.com And guess what was the first blog I read through this proxy? The one which was supposed to be the reason behind this ban (na, am not gonna provide a link) - and I never even knew about this blog before! Guess the Govt of India has ended up providing some indirect advertising for those bloggers with 'objectionable content'!

Oops, now will the sue me for saying this? :P

May be I'll cut it short here. Hoping they lift the ban soon! - Or may be its time I booked my own domain name...

Update:07/ 22/ 06 : the ban seems to have been lifted off now!

Monday, July 03, 2006

18 Errors - No comments found

I was browsing through the AS3LR on LiveDocs today and at some point in time stopped at this (http://livedocs.macromedia.com/specs/actionscript/3/as3_specification195.html) page. Returning back to the FF window after a while freaked me out for a second.

LoL

Wednesday, June 21, 2006

saving XML from Flash, using PHP

I was trying to create a XML file on the server, using PHP. The XML string was being sent from Flash, by adding the same as a property to a LoadVars obj. ( Since I had to send few other data items as well - other than the XML string, I couldn't use Flash's XML.sendAndLoad method; Ok, I can see you guys yelling out, "why not AMFPHP!", but then the app was designed by non Flash clients and they didn't know AMFPHP then)

On the PHP end the following was the code to save the doc.

$doc = new DomDocument();
$doc->loadXML($xmlstr);
$doc->save($picture_path);

When I tried saying the xml, I wasn't able to get it saved. The error was at the loadXML method call. PHP wasnt able to load the XML, from the XMLString. But I was able to trace the XML string. Except for the escape characters for double Quotes ('"' were '\"' at the php end) for the XML node attributes, things looked fine. I tried copying the same string and hardcoding it on the php page, and the XML file was being created, with no issues.

After a few attempts, I was able to narrow down the problem to the attributes in the XMLNodes. the escape characters were indeed the problem. ( am not a php programmer, so, i dont know why)

Now this is what I have as a solution to this:

in the php end, i have done a stripslashes call, before i load it on the DomDocument Object. Like this:

$doc = new DomDocument();
$xmlstr = stripSlashes($xmlstr);
$doc->loadXML($xmlstr);
$doc->save($picture_path);

And it works!

Tuesday, June 06, 2006

[OT] - Look what they did to Flash 8!

Found this link on flashcoders list today. Awesome stuff!

http://abum.com/file/shadow/animations/17632.swf

Reminded me of the XIAO - XIAO movies that used to make rounds loong time back, when i was in college, (and I barely knew flash then)

Wednesday, May 24, 2006

OT - Microsoft Office Professional Plus 2007 Beta available

My first observations:

  1. The UI is ultra cool. Makes me want to use word 2007 all the time
  2. The default font wasn’t Times New Roman anymore. This “calibri” font is real nice on screen!
  3. You have a “Save As” PDF option. You can publish to a PDF file straight from Word. No plugins required anymore!
  4. The default file format is .docx – the new XML based file format,
  5. You can write a post for your blog in word, and have it published at blogger. That’s what I'm doing right now!
  6. Creating tables, ‘Smart Art’ the “roll over to get a live preview“ feature, the page layout “themes”– They just rock!
  7. Lots of features that were hidden below menus are now exposed in the toolbars – and to avoid cluttering of too many tools, they have put them neatly under different tabs. Neat!
  8. Select some text, and a mini format toolbar popups up just along the text. And unless you want to use it, it stays out of your way, as a semi transparent popup.
  9. Press ‘Alt’ and every control in the UI that has a shortcut shows the shortcut key combination to be pressed in a small layer above the control itself.

And many more!

Just like IE 7 and Win Media Player 11 beta, the classic File menu( that’s what they call it ) has been hidden.1

I’ve just gone tried out MS Word 2007- am yet to check out Excel and Powerpoint. This is just too impressive.

Check it out here - <http://www.microsoft.com/office/preview/default.mspx>


And ya, the page has a splash animation, using Flash

Tuesday, April 11, 2006

wmode = transparent in FF plugin - its Key.isDown() this time!

Had there never been transparent windowless mode (wmode), I wouldn’t have proposed a solution using it, to my team. And it wouldn’t have fired back on me now.

As I had mentioned in a previous post I had problems with wmode onMouseWheel event. Finally we ended up with a workaround for this, using our good old hitTest method. Not a great work around, but solved our purpose.

Today pick is the Key.isDown method. With wmode=”transparent”, Key.isDown always returns false even when the corresponding key is pressed.

Try this:

Reproduction steps:

  1. Create a movie with a text field on stage( give it a instance name “log”).
  2. Draw some shape. Make it a button. On that button have the following code:


on (keyPress "")

{

_root.log.text += "\nShift is pressed : " + Key.isDown(Key.SHIFT);

}

  1. Now publish this FLA to SWF and HTML. Open the html file in FF and IE
  2. Try pressing SHIFT + TAB
  3. Verify Result 1.
  4. Now open the FLA and set wmode to “transparent windowless” and then publish
  5. Refresh the pages in IE and FF.
  6. Try pressing SHIFT + TAB
  7. Verify Result 2.

Actual Results:

  1. You’ll see both the browser pages trace Shift is pressed :true
  2. FF traces Shift is pressed :false and IE traces Shift is pressed :true

Expected results:

Both IE and FF should trace Shift is pressed :true at step 8.

Bad bad bad bad bad bad bad bad (read it like how Mallory says ;o) )

Work around: ( I hate this part)

Make a keyListener object in the root level(or anywhere you need it) of ur SWF and onKeyDown check if SHIFT is pressed and toggle a variable to true. on KeyUp, toggle it back to false. And everytime u want to do a Key.isDown (Key.SHIFT), check ur variable instead.

Doh!

Sunday, April 02, 2006

China Buys Google - Oh man, Did I just get fooled??

It just isn't making much sense in Google being bought over by China's ministry of Info.. And when I read the article again, Every other detail seems to be wierdly made up! And worst of all, its still April 1st out there!!!

Pranks by Google on previous April Fool's days just struck me now!!!

If its a april fool's game, they seem to have planned it great - I read that on theregistrar's site and I found the link in scobleizer's blog, and there are other 'breaking news' as well!

I tried reading the 'breaking news' posts as well, but am not able read thru.. Probably I should get back to sleep!

Doh!

But hey, it isnt a far game after all.. Its April 2nd here already :D