Matt Kenefick
Contact Me Experiments Blog Portfolio

Stop replacing HTML with Flash !!!
December 01, 2008

I keep seeing this over and over again. I do not understand why some companies feel the need to replace HTML style websites with Flash files. If there was some benefit of animation or usability, I could understand. I am talking about the ones that actually try to replicate the look of an HTML site but by using Flash.

To me, this seems like making an advanced 360-degree hologram projection of a 1970’s television set. You know, you could just get a 1970’s TV instead? Why use something that offers benefits to create something that has already been made (and better).

I have seen several websites that do this, but the one that recently just tipped me off into writing this is Fi’s latest creation Kontain. I mean no disrespect to Fi, the creators, or their intentions by writing this entry. The site is beautifully done and Fi has always been known for going above and beyond in their quality of work. I recently had to downgrade to Flash 9 in order to test some websites that used the Flash uploader (which no longer works in Flash 10 due to security restrictions). I went to Kontain.com to check it out and found that I could not view it without Flash 10.

First off, I have not so far seen a reason on this site that would require Flash 10. I have not even seen a reason to use anything beyond Flash 8 here, but maybe I have missed something. The site design is very well done, but replicates typical CSS style layouts. The animation is not much more than your everyday CSS / AJAX website so I do not really see the purpose of loading a Flash application here. Text could be smoothed using Flash and embedding fonts, but it is all regular just like HTML. The only thing I have seen that would be a “benefit”, if you could call it that, is a custom context menu. Then again, it does not really offer any benefits, so perhaps I used the wrong word.

The inital load, straight from the get-go, is a whopping 2 MB! lib_common.swf taking up the bulk at 345kb (!?) Followed by gui.swf (254kb), and with several others following … fonts.swf (90kb), another gui.swf (45k) and more.

Personally, and I may be alone in this, I think people should use the right technology for the right project. If you are going to making something that simulates CSS and AJAX… Just use CSS and AJAX. If there is an actual benefit to using Flash, use Flash.

And for the sake of everything holy,

OPTIMIZE!!

Stop producing sites that are 5MB+ that could easily be < 1MB. STOP BEING LAZY.

Fractal4D: First Release
November 26, 2008

Check out this temporary page for Fractal4D updates!

—————————–

Here is the first public release of Fractal4D. It is still beta, but there is a built-in auto updater that will make sure you have all the necessary updates without having to check for announcements. The auto-updater does not affect any files or directories outside of its own application directory. This is an AIR app, so you will need Adobe AIR to use it. Please leave feedback, comments, and suggestions.

OR


Download F4D


Donate to help make Fractal4D better!

Notes:

  • It defaults to exporting an illustrator script. If you want to save an image, you must uncheck “Export to Illustrator” in the Options menu.
  • Version 1.22 is going through changes with easing methods. The only one that exports exactly for illustrator is linear. The others are undergoing changes. Sorry.
  • Better documentation and cleaner menus are coming!

If you find any bugs let me know. I am going to fix the ones that exist and you will all be updated automatically when this happens. I wanted to get this out before Thanksgiving and there is substantial to play with and get familiar with before these bugs will affect you. I will also be adding an additional hotkey to simulate a mouse click to start/stop your lines.

More to come! View the other posts to see some demo videos.

Videos:
Exporting Illustrator - http://mattkenefick.com/blog/2008/11/f4d-export-to-illustrator/
General Options - http://mattkenefick.com/blog/2008/11/f4d-general-options-demo/
Color Shifting - http://mattkenefick.com/blog/2008/11/f4d-color-shifting-demo/

Examples:

F4D + AIR Updater
November 24, 2008

I am just debugging a few small problems with Apple machines and then there will be a release. Apparently the Mac does not like to handle AIR apps the same way Windows does so there are a few things I have to sort out. Luckily though, I have the AIR updater installed into F4D.

The AIR updater will automatically check the server for differences in your version and the latest version. It does not necessarily check for an entirely new release, but it looks for any differences. This way, if there are a few UI changes, or subtle changes in an external file, those will be taken care of automatically without updating anything else. When a new release of F4D comes out, yours will automatically be up-to-date upon launch. These updates are practically instant. It is not like other apps where you sit there and wait for the download, then install, then relaunch… It literally downloads it fast, then launches… No installations.

This can be turned on and off incase you do not want to always be up-to-date. If you are not online, it will skip the update process.

This was essential to put in before I release it so I do not have to constantly announce “Small fix necessary in section X”. Now, you can just download it and always have the fixes without even knowing. You should be able to see something this week!

Security Note: This does NOT affect anywhere on your computer except F4D’s personal directory. It also will not load your computer up with junk. The current installation size is approx 300k and I do not see it needing to go over 500k.

AIR: Creating an AS3 updater
November 18, 2008

Here is a simple code that will check a server to see if there are updates to your app. It reads an XML file that contains details like: Version, Name, Release, Changes, Download Link. You can add/remove as you wish. It compares to a set version variable in the kapp class. If it does not match, it shoots out an event that you can monitor.

This is a very simple example. Later I will post an example of:

  • Check server for updates
  • If version is greater, ask to update
  • If yes, download update automatically.
  • Automatically show new app without restarting.

This will let the user very easily update your AIR apps without having to open any AIR files or doing anything manually. You simply say “Update”, and from there.. it downloads, installs, and reopens automatically.

Keep an eye out.

Download Source

AIR: Dynamically compiling a SWF file
November 18, 2008

Here’s something I was faced with and conquered:

I was compiling my AIR application and did not want a SWF file to be left in the directory. You could decompile it, you could try to open it on its own, and it just looked unprofessional. So in order to resolve this I thought, “Well I can just rename it to something else.” But that was not quite the effect I wanted.

What I ended up doing was dividing it up into multiple files, scrambling the data inside, encrypting each file, and spreading them out. This makes it so that no one can actually just throw your SWF into a decompiler and looks a little more legitimate.

The reason this can be done is because of ByteArray, File, Loader, and LoaderContext. What you do is:

  • Create a ByteArray
  • One-by-one write each file’s data to the ByteArray in the correct order
  • Use: loaderContext.allowLoadBytesCodeExecution
  • Create a Loader and load the Bytes in ByteArray:  loader.loadBytes( your_byte_array, loaderContext );

“allowLoadBytesCodeExecution” will actually let you load a file from its internals rather than creating an archive on the system first. If there is no archive, there is nothing to decompile.

With this method, you can split your file into multiple sections, encrypt the code in different ways, and more. Some possible uses:

  • Encrypt files using a personal salt (password) so it is password protected
  • Encrypt files using MAC address so it only works on a specified computer

I have it working well and all, but there is still more to experiment with. I just thought I would share the good news!

F4D: Export to Illustrator
November 16, 2008

I was a little tired when recording this one.

F4D: General Options Demo
November 16, 2008

F4D: Color Shifting Demo
November 16, 2008

“Great” developers versus great developers
November 13, 2008

There are a lot of really good developers out there. I feel some of them climb the ladder and either hit the “great” category, or the great category. I use one in quotes to represent the same area of expertise but with a slight difference that means a lot. I will relate this area to design patterns for this example.

A “great” developer knows the ins-and-outs of OOP, knows design patterns, knows how to implement them properly, and follows the rules of the pattern strictly.

A great developer knows the ins-and-outs of OOP, knows design patterns, knows how to implement them properly, and follows the rules of the pattern loosely.

Design patterns are not laws. There are things you can do in your coding that will go against the the pattern definition, but leave the heart and idea in tact. I have seen some pieces of code get criticized because they are not a “proper singleton” pattern or … whatever the excuse is. The truth is that the “great” developers are either not good enough to actually bend the rules or they have nothing else going for them except perfection in patterns.

Patterns are great because they are a universal concept to an approach and they have been proven to organize code, but these are not restrictions as some people seem to think we are bound to. It is okay to bend concepts of a pattern if it fits your application more or makes more sense. I have seen situations where actually implementing the pattern to perfection is more confusing then taking a small detour. Knowing when to use a proper pattern and when to bend the rules a little is what separates a “great” developer from a truly great developer. When you are a young programmer, you are afraid to stray far from what you know so you do it strict and to the point. As you gain more experience, you realize that being so strict was never necessary. That concept applies further and further.

( When I say “bend” the rules, I do not mean tearing them to shreds and doing your totally own thing and claiming to be something else. )

Design patterns, and most concepts in developing, are not rules… They are more like guidelines.

AS3 KMenu: Source coming later tonight…
November 11, 2008

Check out this page for the demo: http://mattkenefick.com/x/kmenu/readme.html

Downoad Source! ( You should read the page above first though )