Flash / Flex / iPhone

The Coders Lounge

Google Chrome is an amazing browser but for a developer, it can be quite annoying when developing a web application due to it’s caching feature. Firefox has the handy Web Developer’s Toolbar which is great, the Google Chrome variant is lacking a few key features such as disabling cache. On Windows, you can launch Google Chrome with --disk-cache-size=0, sadly for Mac OS X it isn’t that simple. There’s a trick though, remove the read + execute properties from the cache file itself:

To disable Google Chrome’s Cache, copy and paste the following into terminal on your Mac:
chmod 222 ~/Library/Caches/Google/Chrome/Default/Cache/index
chmod 222 ~/Library/Caches/Google/Chrome/Default/Media\ Cache/index

Source: http://dmmcintyre3.tk/google-chrome-disable-cache-updated

  • 0 Comments
  • Filed under: Tips & Tricks
  • Disable Adobe AIR Runtime Auto-Update

    So today I came across an issue where our client wanted to disable Adobe AIR runtime auto-update feature due to the fact that most users of the application don’t have admin rights to the machine. There’s two ways that I’m aware of to disable this feature:

    1. Use Adobe AIR’s Setting Manager AIR application. It’s a bit cumbersome, the user has to install the application (which they cannot do if they dont have Admin rights) and then click a button to disable/enable Adobe AIR runtime auto-update.
      http://kb2.adobe.com/cps/403/kb403175.html
      Click Here to Download Settings Manager AIR application
    2. The slicker solution is updating the registry setting on a windows machine (I don’t know how to do this on a Mac…yet, but if anyone does please post the solution). You can do this via updating the UpdateDisabled setting located in HKLM\Software\Policies\Adobe\AIR
      http://help.adobe.com/en_US/AIR/1.5/devappsflex/devappsflex.pdf
      Search for “Windows registry settings for administrators” on Page 74

    Web applications have evolved from simple HTML pages into rich, interactive applications that provide a great user experience. Today’s web apps pose a challenge for developers, however: how do you create and maintain efficient JavaScript code that downloads quickly and works across different browsers?

    The Closure tools help developers to build rich web applications with JavaScript that is both powerful and efficient. The Closure tools include:

    A JavaScript optimizer

    The Closure Compiler compiles JavaScript into compact, high-performance code. The compiler removes dead code and rewrites and minimizes what’s left so that it downloads and runs quickly. It also also checks syntax, variable references, and types, and warns about common JavaScript pitfalls. These checks and optimizations help you write apps that are less buggy and easier to maintain. You can use the compiler with Closure Inspector, a Firebug extension that makes debugging the obfuscated code almost as easy as debugging the human-readable source.

    A comprehensive JavaScript library

    The Closure Library is a broad, well-tested, modular, and cross-browser JavaScript library. You can pull just what you need from a large set of reusable UI widgets and controls, and from lower-level utilities for DOM manipulation, server communication, animation, data structures, unit testing, rich-text editing, and more.

    The Closure Library is server-agnostic, and is intended for use with the Closure Compiler.

    An easy templating system for both Java & JavaScript

    Closure Templates simplify the task of dynamically generating HTML. They have a simple syntax that is natural for programmers. In contrast to traditional templating systems, in which you use one big template per page, you can think of Closure Templates as small components that you compose to form your user interface.

    Closure Templates are implemented for both JavaScript and Java, so that you can use the same templates on both the server and client side. For the client side, Closure Templates are precompiled into efficient JavaScript.

    http://code.google.com/closure/

  • 0 Comments
  • Filed under: JavaScript
  • Rapid Wire-framing + Prototyping Tools

    Online collaborative wire-framing + prototyping tools:

    http://www.hotgloo.com/

    https://pidoco.com/en

    http://www.protoshare.com

    http://iplotz.com/

    Key Features:

    • Team collaboration, you can have many reviewers review the wireframes. Some products above allow multiple editors.
    • Multiple pages
    • Quickly find & solve usability issues.
    • Wireframes quickly become prototypes; they are interactive, e.g. drop-down menus actually work in review mode (although no real logic can be applied). Also, buttons can link you to another wire-frame “page”. E.g. a search button on the homepage wire-frame will actually link you to the “search results” wireframe page.
    • Reviewer’s can annotate/comment on wireframes. Some tools allow conversations to be annotated per module.
    • Web based, no need to install software. Can be accessed via any browser supporting Flash 9+.

    I personally have only used hotgloo.com. The only thing I didn’t like about it is that the default component set is basic and it only allows 1 “editor” at a time. Also, a “reviewer” will see changes only when the “editor” saves the wire-frame, so it’s not really “real-time”. A reviewer can add annotations to a wireframe. Some of the other tools support the ability to have a conversation about a particular module which can be very useful for future reference.

  • 0 Comments
  • Filed under: Design
  • Hidden Flash Player mm.cfg treasure

    Great blog post about some very interesting mm.cfg values:

    http://jpauclair.net/2010/02/10/mmcfg-treasure/

  • 0 Comments
  • Filed under: Uncategorized
  • Instead of creating images or using flash just to show your site’s graphic text in the font you want, you can use typeface.js and write in plain HTML and CSS, just as if your visitors had the font installed locally.

    How It Works
    typeface.js uses browsers’ vector drawing capabilites to draw text in HTML documents. For a good while, browsers have had support for vector drawing — Firefox, Safari, and Opera support the element (as well as SVG), and IE supports VML.
    The typeface.js project has two components: the perl module for converting fonts, and the javascript library for drawing in the browser. The perl module extracts glyph outline information from truetype fonts and writes that data in JSON format. The javascript library then traverses the HTML document and renders text using or VML to draw the glyphs.

    http://typeface.neocracy.org/

  • 0 Comments
  • Filed under: Uncategorized
  • Google Chrome fails to load PDFs

    I’ve been having an odd issue with Google Chrome where it would not load any pdf’s. I would get the following error:

    “The adobe acrobat/reader that is running can not be used to view PDF files in a web browser. Please exit adobe acrobat/reader and exit your web browser and try again.”

    After some quick research, I found that it’s due to a conflict of having Acrobat Pro + Adobe Reader installed.

    Solution 1:
    To fix this issue, simply uninstall “Adobe Reader” from your Windows machine.

    Solution 2:
    If you don’t want to uninstall Adobe Reader, do the following:
    1.  Open Adobe Acrobat
    2.  Drop down Edit
    3.  Click on Preferences
    4.  Click on Internet
    5.  Check the box next to Display in Browser (the first time I did this the box was un-checked)
    6.  Close Adobe Acrobat

    Google Support forum:
    http://www.google.com/support/forum/p/Chrome/thread?tid=74b257fb361db811&hl=en

    Issue filed in Chromium’s Bug log:
    http://code.google.com/p/chromium/issues/detail?id=3977

    A link to Adobe’s Response (not Google Chrome Specific):
    http://kb2.adobe.com/cps/405/kb405461.html

  • 0 Comments
  • Filed under: Tips & Tricks
  • Google Chrome is my personal favorite browser…it’s lightweight and extremely fast. When constantly debugging Flash/Flex applications, Firefox can become cumbersome. However, as you all know, there’s a significant advantage to using Firefox…extensions. When developing web applications/games, firefox’s web-developer toolbar, fire bug, tamper data and Flash Tracer are essential tools which faciliate the debugging phase in the Software Development Life Cycle. Although it’s tough to find a good replacement of fire bug and most of the features of the web-developer toolbar, it’s possible to use standalone software to achieve some of the functionality in other browsers (including Google Chrome). Using software such as Service Capture or Charles, you can disable/prevent caching as well as watch/modify http/https/amf packets.

    Service Capture:
    http://www.kevinlangdon.com/serviceCapture/

    Charles (my personal recomendation):
    http://www.charlesproxy.com/ 

    Like myself, there’s a flood of developers now purchasing Macs to code for the iPhone platform (Apple, you guys are taking a decent amount of greenbacks from us Windows based developers!). For those of you new to Xcode, you add a framework by doing the following:

    1. Open your project in XCode
    2. In the project window, ctrl+click (or right-click if you have 2-button mouse) on ‘Frameworks’ folder > Add > Existing Frameworks
    3. Navigate to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/System/Library/Frameworks/CoreLocation.framework
    4. Click ‘Add’ button
    5. Compile

    You’ll need to do this in order to use CoreLocation and a variety of other classes needed for certain functionality (gotta be vague here since we’re still under NDA with Apple!). Hope this helps someone :-).

  • 2 Comments
  • Filed under: iPhone
  • AS3: Dynamic Grass + Wind

    If you’re a veteran of the Flash world and don’t know who Grant Skinner is, you should seriously code for a differently platform. Grant Skinner has been enlightening developers for many years, he also played a roll with the new component framework in Flash CS3. Recently Grant posted a concept he created to showcase drawing curved lines in AS3. Well, he went a bit further and really made this thing sweet. A thing to note is the dynamic wind applied to the strands of grass. They all move together in harmony. Great work Grant!

    http://www.gskinner.com/blog/archives/2008/05/cut_by_the_wind.html