Monday, June 23, 2008

A few of you will probably run into the problem of invoking your coldfusion components if you install ColdFusion to use your own webserver and you don't have the cfc placed in the standard folder path.

The answer to fixing this is in this article:
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=buildingComponents_27.html

Specifically this:

ColdFusion uses the following rules to find the specified CFC:

* If you use a cfinvoke or cfobject tag, or the CreateObject function, to access the CFC from a CFML page, ColdFusion searches directories in the following order:
1. Local directory of the calling CFML page
2. Web root
3. Directories specified on the Custom Tag Paths page of ColdFusion Administrator
* If you specify only a component name, ColdFusion searches each of these directories, in turn, for the component.
* If you specify a qualified path, such as myApp.cfcs.myComponent, ColdFusion looks for a directory matching the first element of the path in each of these directories (in this example, myApp). If ColdFusion finds a matching directory, it looks for a file in the specified path beneath that directory, such as myApp\cfcs\myComponent.cfc, relative to each of these directories.


So to help ColdFusion find your component, you can specify your custom folder in the Custom Tags Path in your CF admin tool. Once you do that, everything will work the way it should.

Sunday, June 22, 2008

These nice Flex tips were posted by David Zuckerman, mirroring here for my convenience.

http://davidzuckerman.com/adobe/2006/10/27/flex-builder-editor-cheat-sheet

1.) Open type (Ctrl-Shift-T)* - this lets you browse all the types (AS classes/interfaces, MXML files) in your project and quickly open them.

2.) Goto Definition (F3/Ctrl-click on identifier)* - quickly jump to the definition of an identifier (type/variable/function).

3.) Quick Outliner (Ctrl-O)* - get the outline view as a pop-up window, with the added ability to type and filter down to the function/member variable that you’re looking for.

4.) Context sensitive help (F1 on an identifier/tag) - for an MXML tag, function or class/interface, show the help entry for that item in the Eclipse Help Panel.

5.) Open context sensitive help (Shift-F2 on an identifier) - for an MXML tag, function or class/interface, show the help entry for that item in the integrated Help browser. This will most likely open a new browser window.

6.) Jump to matching brace (Ctrl-Shift+P)* - jumps to the matching brace if your cursor is to the left or right of a given balanced brace.

7.) Hover over an identifier - when you put your mouse over a variable, we display its type. When you hover over a function, we display its return type (if it has one).

8.) Add CDATA block (Ctrl-Shift-C) in MXML - wraps a given selection in a CDATA block

9.) Event type hinting (Ctrl-space) - addEventListener( will display all the events that are relevant targets for a listener function.

10.) Fold all functions/ASDoc comments/comments in ActionScript - With folding enabled, right-click on the vertical gutter, drill down to “Folding”

11.) Organize imports (Ctrl + Shift + O)* - Sorts the imports in ActionScript files, removes duplicates and consolidates when needed

Friday, June 20, 2008

Have you ever run into gotoAndPlay in AS2 not working? It's as if the playhead is stuck at the frame location that you go to. This bug has been around for quite some time, seems to be a problem with the Flash player. The way to get around this is by putting a play() in the frame that you want to go to to force it to play. I have not run into this issue with Flash 9/AS 3 yet.

In C, you can use compiler preprocessors to do conditional compilations (#if, #ifdef) to help exclude certain things from being compiled into your final executable.

Since preprocessor is not available in Flash, if you want to dynamically include something for local testing and exclude it during web deployment, you can use the player type check to achieve similar results.

e.g.

if (System.capabilities.playerType != "External")
{
// show fps meter
}

A lot of the audio visualization effects - while visually pleasing, don't move me at all. We have seen plenty of things that move us, so why not this? I think this is a classical problem of technical people trying to approach this from the back (info, bit processing) instead of front (heart/soul), and end up interpreting too much of the audio info in their algorithms instead of trying to figure out what can be ignored to create something that moves people. What I am looking for is visuals that dance with the music, not just purely interpreting what is in it.

Do you have the same issues with the audio visualization stuff you see out there?

Thursday, June 19, 2008

Sometimes you have quite a few places using the same movieclip (across movieclips, across tween frames), and it's quite a pain to have to name all the instance name. The best way to get around this is to create a class and associate it with the movieclip, and name it inside the movieclip itself: e.g.

class mc
{
private function onLoad() { this._name = "instance_name"; }
}

Much quicker and no need to mess with the FLA.

Wednesday, June 11, 2008

Editing a symbol, especially one that is empty in its first frame, requires precise selection right down to when you double click it. I have lately mapped Ctrl+E to edit in place and have found this to be a time saver.