" /> Last ActionScript Hero - Blog - Flash & Related Technologies: May 2006 Archives

« April 2006 | Main | June 2006 »

May 30, 2006

[OT] Signs You're a Crappy Programmer (and don't know it)

Listen to this article Listen to this article :: Talkr

Stumbled upon this - interesting and funny.

Signs You're a Crappy Programmer (and don't know it) through Damien Katz blog.

I particularly liked these three points as I have seen people doing it many times.


# You are adamantly opposed to function/methods over 20 lines of code.

(or 30 or 10 or whatever number of lines) Sorry, sometimes a really long function is just what's needed for the problem at hand. Usually shorter functions are easier to understand, but sometimes things are most simply expressed in one long function. Code should not be made more complex to meet some arbitrary standard.

# You think error handling means catching every exception, logging it and continuing on.
That’s not error handling, that’s error ignoring and is the semantically equivalent to “on error next” in VB. Just because it got logged away somewhere doesn’t mean you’ve handled anything. Error handling is hard. If you don’t know exactly what to do in the face of a particular error, then let the exception bubble up to a higher level exception handler.

# You model all your code in UML before you write it.
Enthusiastic UML modeling is typically done by those who aren’t strong coders, but consider themselves software architects anyway. Modeling tools appeal most to those who think coding can be done in conference room by manipulating little charts. The charts aren’t the design, and will never be the design, that’s what the code is for.

May 04, 2006

Hacking your way around FlashPaper API's - A almost complete Object Dump of the various Flash Paper API's

Listen to this article Listen to this article :: Talkr

FlashPaper is do damn good but the only problem is that you cant really get the full potential until you hack around a bit. In my case I was creating a online catalog which has multiple pages and a page flip effect and there are around
1000's of these pdf documents which has to be converted into online and have the flip effect.

Obviously the easiest approach would be to batch convert these PDF files into FlashPaper SWF's and then loading them into a Flip Book Player. But the only problem is that you really cant have each of the page on a flip book contain all the FlashPaper controls. I started hacking around it and I am almost done disbaling everything and customizing the look to what I want it to look like.

Here is a Object Dump of all the FlashPaper SWF contains and luckily most of them can be tweeked. Check this out, it has 100's of properties which you can hack around.

This page contains the Object Dump which lists (mostly) all the API's available and their values and types : FlashPaper API - Object Dump.html

Out of all these the most used ones would be:

1) To make the complete toolbar invisible. With this you should be able to get rid of the Flash Paper logo as well

.toolbar_mc._visible = false;

2) If you are working on a single page SWF and you dont want to show the disable scrollbar which lies there useless then you can use the ones below.

_root.theDocMC.document_mc.y_sb._alpha = 0;
_root.theDocMC.document_mc.x_sb._alpha = 0;

Note:

The page flip effects seems to be damn slow when using SWF's instead of JPG's or MovieClips. Does anybody out there know of a good opensource Flip Book which is fast, sleek, fancy and still works great with external SWF's?