Stuff I am building:


Ted Patrick - Events & Community @ Adobe Systems


Note: This is the personal blog of Ted Patrick. The opinions and statements voiced here are my own.



OT: Jedi Revisionist History

DIGG IT!     0 Comments Published Tuesday, September 28, 2004 at 5:39 PM .

If episode I and II weren't bad enough, Lucas added Hayden Christensen into the final scenes of "Return of the Jedi" on DVD. Talk about revisionist history.&

I'm sorry but I grew up on Star Wars and it is profoundly disturbing to see an actor from the Episode I, II, and III digitally inserted into the Trilogy. What was wrong with the older guy in the original? He should file a lawsuit against Lucas for wrongful editing! It is unfortunate to say, but I think Lucas is milking the cow for all its worth.

I want to find a vintage copy of the Trilogy transferred from Laserdisc (circa 1988) onto DVD. It is unfortunate that you can't find copies of the original films in good condition that do not include the revisionist "additions".

LAST SCENE: RETURN OF THE JEDI - DVD Sept 2004
Setting: Forest Moon of Endor

The Death Star 2 has just exploded. Celebrations are occurring across the galaxy. In the Ewok Village, fires are burning as the celebration continues. Luke hugs Leia and Han Solo and turns toward the woods. Appearing before him are Obi Wan Kenobi (Sir Alec Guinnes), Master Yoda (Frank Oz) and Anakin Skywalker (Hayden Christensen).

It is a sad day in a galaxy far, far away.

Ted ;)


Code Editor

DIGG IT!     3 Comments Published Monday, September 27, 2004 at 4:00 AM .

I switched editors this weekend. After 4 years of working with Code-Genie and its limited syntax highlighting, I switched to Boxer.&

I edit allot of text and editors make a profound difference in my ability to see and address errors quickly. I have been searching for a text editor that provides a great balance across different languages. Lately I find myself editing ActionScript, C# (ASP.NET), PHP, and Python with regularity. I needed a text editor that provides common syntax highlighting within multiple lauguages. I had found myself using IDLE for Python and Code-Genie for all others. Since I could never get a common view of the different languages, it presented a problem that could only be solved by switching editors all together.

BOXER INFORMATION

Boxer supports dialog driven syntax files that separate highlighting style and the language syntax. This allows you to define a language syntax quickly and apply common highlighting across many syntaxes. Simply change the highlighting style and changes are seen across all languages. Yesterday I added support for C# and Python allowing both to visually match my preferences. In additon, Boxer uses the syntax keywords within an active spell checker, allowing you to see spelling errors within a language visually.

Better still Boxer suppors multiple keyboard layouts and includes layouts for most major editors in existence. I opened the keyboard layout and selected "UltraEdit" and found myself instantly productive.

Boxer is fast, very stable, and allows me to customize the view to match my editing style. Even now I am pretty sure I have only scratched the surfact of this tool.

Cheers,

Ted ;)


What is your Status?

DIGG IT!     2 Comments Published Thursday, September 23, 2004 at 11:51 AM .

Everything has status but not everything has presence. I have been thinking allot about status lately and the model for a new application is rapidly emerging.&

I have status.
Projects have status.
Elevators have status.
Servers have status.
Stocks have status.
Trains have status.
Applications have status.
Stores have status.

What is NFLX doing right now?
What is PowerSDK doing right now?
What is Ted doing right now?

Status is not an online or offline thing, it is a concept grounded in reality because everyone and everything is doing something. When someone logs off AIM, they don't have presence, but they continue to have status.

How would you publish status?
How would you update status?
How would you manage subscribers? Could you?
Could your status have different views? Friend, Co-worker, Component
Could a view be private?
How big would a status XML packet be?
What would the properties say?
Could you have icons with your status?

I am building an application called Status. It will allow you to publish status on all sorts of things easily. It will allow you to share status with others and provide you with other people's/thing's status in a simple view.

Example:
<status date="1095966585453"
name="Theodore E. Patrick"
blog="http://www.powersdk.com/ted/">
<icon value="Keyboard" />
<message>Working on "Status" the application.</message>
<wisdom>"Easy things are easy, and hard things are possible." - Larry Wall on Perl</wisdom>
</status>


Thoughts? Comments? Feedback?

Cheers,

Ted ;)


SWF Edit in Central Gemini

DIGG IT!     0 Comments Published Tuesday, September 21, 2004 at 1:15 PM .

Here is a simple app using FileIO in Central 1.5. SWF Edit is an header editor for quick changes to binary SWF files. Simply "Import SWF File" to view/edit the SWF header.&



Here is the source for the application:

SOURCE CODE

Careful with the Version property, there are currently no restrictions on the value and AS compression doesn't work in F6 or lower so be warned.

Cheers,

Ted ;)


FileIO - Writing binary files in Central 1.5

DIGG IT!     0 Comments Published at 5:31 AM .

So Central can read and write files including binary and text files. I am going to explore the methods for working with binary data in Central.&

It is fair to say there are essentially 2 types of files, binary files (PNG, SWF, GIF, EXE, ZIP) and text files( TXT, HTML, XML). Central provides methods in the FileReference Class to work with both types of files.

When you read a binary file in Central, it returns an array filled with byte values of the file in 8-bit blocks. Reading a binary file requires that you start at one point and read to another point in the file. The results contain all the bytes from the start to the end point stored as an array. Here is an example:

//create an instance of the FileReference Class
myBinFile = new FileReference()

//if browse returns a file do this
if (myBinFile.browse(["Flash Movies", "*.swf"])){

swfHeaderArray = myBinFile.readBytes(4)
version = swfHeaderArray[3]
}


In the above example, I used a file reference to prompt the user for a SWF file. If the user selected a SWF file, I read the first 4 bytes from the file and created a variable called verison that denotes the SWF version number from the 4th byte in the file. The first 3 bytes of the SWF format read "FSW" and the version follows as an 8-bit value.

So lets modify this Flash file version value to 7 by using writeBytes on a copy of the file and returning to file to the end user.

//create an instance of the FileReference Class
myBinFile = new FileReference()

//if browse returns a file do this
if (myBinFile.browse(["Flash Movies", "*.swf"])){

//make a copy of the file into the cache
myBinFile.copyIntoCache('workFile.swf')

//close the FileReference
myBinFile.close()

//create a new fileReference
myBinFile2 = new FileReference()

//open the copied swf file
myBinFile2.open('workFile.swf')

//read 4 bytes of the header
swfHeaderArray = myBinFile2.readBytes(4)

// modify the 4th byte to 7
swfHeaderArray[3] = 7

// set the cursor position in the swf file to the start
myBinFile2.setPosition(0)

// overwrite the first 4 bytes of the swf file
myBinFile2.writeBytes(swfHeaderArray)

// propt the user to save the file locally
myBinFile2.saveAs()

// close the file
myBinFile2.close()

}

As you can see you can get fairly advanced with FileReferences and FileIO. Hopefully it wil be useful on your next Central project.

Cheers,

Ted ;)


FileIO - Central Learns to Read and Write

DIGG IT!     3 Comments Published Monday, September 20, 2004 at 6:12 PM .

The single best addition to Central 1.5 is FileIO. With FileIO you can read, write, upload, and download files directly within a Central App.&

To use FileIO you need to use the FileReference Class. Just like MovieClip or Object, FileRefence is a default class within the Central Player. To use it you need to create an instance:

myFile = new FileReference()

Simple, eh! But wait, FileReference instances do not do anything until you intialize the instance to a file. See the Class needs a file to work with and that is the essence of the initialization process. Initailization either invoves binding it to an exisitng file or creating one from scratch.

So lets intialize a file in the Central Cache by creating a file. The first argument is the path to the file and the second is to overwrite a file if it exists.

myFile.create("myFile.txt", true)

Central just created an empty file named "myFile.txt". If the application were installed from "central.powersdk.com" this file is located here:

C:\Documents and Settings\Theodore Patrick\Application Data\Macromedia\Central\#Central\{MAGICID}\Local Internet\central.powersdk.com\myFile.txt

(Files on Mac are stored on a similar path)

So we have a file, lets write some text into it!

myFile.writeString("Hello World, I am written with Central!")

Now files within the Central cache are fun but writing the file locally is much better. To do this we use the saveAs method to prompt the user to put the file onto their local file system.

myFile.saveAs()

When this executes, the user will recieve a "Save As" dialog box that looks similar to this one:


The last thing we need to do is close the FileReference like so.

myFile.close()

TADA, Central can read and write. What is amazing is that FileReferences can read and write binary files which dramatically expands your file capabilites.

I will post some other FileIO goodness soon.

Cheers,

Ted ;)


Central 1.5 Starter App "My App"

DIGG IT!     0 Comments Published Saturday, September 18, 2004 at 11:40 AM .

"My App" is a simple starter application that provides the basics for working with Central. I have included full source.&



Download Source

This is how I organize my Central apps. First the root folder is put into a common place for each particular application. It is important to always have the product.xml file remain in the same url so installed applications can update correctly. To prevent partial updates and to easily version control an application, all of a versions files are contained within a subfolder with a unique number id. Assuming that "My App" is version 1.0, the folder would be /myapp/0/ and for 1.4 the folder would be /myapp/4/.

Inside the /0 folder is a Python application called deploy.py. Deploy allows you to have a local source version of your application and write the output files to your local Central installation. Ideally you edit the local main.fla and create main.swf, then execute deploy.py. This will copy all .swf files into the designated path within the Central path. Simply edit the path within deploy.py to write to your particular installation path.

Also unique to this app is a onResize method that resizes the application layout depending on size changes of the installed application. If you resize the Central window, the application layout changes. The key is that the Central Shell interacts periodically with your application by calling standardized functions when events occur in the Shell. If the network goes offline, the shell fires the onNetworkChange function. If the Shell is resized, onResize is executed.

Hopefully this will help you get started authoring for Central 1.5.

Cheers,

Ted ;)


Icon Collections .IBC Files

DIGG IT!     0 Comments Published Friday, September 17, 2004 at 5:53 AM .

Icon Collections are a new feature of Icon Builder 2005. The feature allows you to share icons in a single file. The files can be imported into Icon Builder through the Share menu.

Here are 2 Icon Collections for your use:

ZIP File of both

1. Install Icon Builder 2005 (with Central 1.5)

2. Download the IBC files above
3. Open Icon Builder 2005
4. Press "Share"
5. Press "Import Icon Collection"
6. Select the .IBC file
7. Icons are previewed
8. Press Save Collection to Path (optionally add a path to precede the files)

Collections allow you to bundle a set of icons together. They are great for archiving icons you have made outside of Icon Builder. They are ASCII XML files so they are editable in a text editor if needed.

They are a lot of fun and make working with collections of icons much easier.

Cheers,

ted ;)


Icon Builder 2005 for Central 1.5

DIGG IT!     0 Comments Published at 4:57 AM .

I have upgraded Icon Builder for use with Central 1.5. You can now import and export PNG, GIF, JPG, BMP, ICO and SWF from within the editor. It makes authoring icons simple and greatly extends the functionality of the software.



New Features:

Import - ICO, PNG, JPG, GIF, BMP
Export - ICO, PNG, JPG, GIF, BMP, PSD, TIF, SWF
Share - Import and Export Collections *.IBC Files
Better Editing Tool
Keyboard Shortcuts
Icon Rendering is 6 times faster (mainly due to F7 Player)

I also published an article for the "Central Developer Center" on using FileIO:

Working Together: Icon Builder and Central 1.5

If you are interested in building commercial icon collections for sale please contact me. The 2.1 release of Icon Builder will have a store allowing you to sell or buy icon collections from within the IDE.

I look forward to getting your feedback on the new release.

Cheers,

Ted ;)


PowerSDK Site

DIGG IT!     0 Comments Published Thursday, September 16, 2004 at 6:35 AM .

I updated the PowerSDK company site to provide more than a floating logo. Hopefully more than a few insiders and clients can know what we do and the road we have travelled. I should have done this ages ago.

http://www.powersdk.com

If you find any bugs, let me know and I will send you a PowerSDK coffee mug seen here.



Cheers,

Ted ;)


How do you learn? I struggle.

DIGG IT!     0 Comments Published Tuesday, September 14, 2004 at 6:07 AM .

Everyone is very different in how they learn new things. I am studying Turkish through CD software while my wife learns in a classroom setting. Somehow I am finding that the CD learning is much more productive for me. It has made me question how I learn and attempt to orient my work/learning to my advantage.

As a software developer I learn new things all the time. Syntax, patterns, concepts, languages, frameworks, tools and how to solve problems in a practical manner. I believe that I learn most effectively through struggling with a problem. It seems to me that in struggling with a problem you understand the true issues and are better prepared to address future problems that are slightly different. I have struggled with Flash since it was FutureSplash Animator and have watched the evolution of the Flash Player from a simple vector animation engine to a distributed software development platform. In struggling with Flash, I have gained a deep understanding of how the player works. This understanding has become invaluable in my consulting practice. It is not that I know everything about the player, I don't, but I can design problems that expose specific player behavior. This sort of knowledge would be extremely difficult to explain in a book as it involves the context of the problem at hand. You can take the brightest student and give them 100 of the best Flash books on the planet and without struggling with the Flash IDE, Flash Player, and real development problems, they would be useless in a consulting capacity.

I watched a MM Preso on Flex Builder (Nice work Lucian!) and found that watching someone else work with a tool is limiting for me. After the Preso, I fired up Flex and installed Flex Builder to attempt to struggle a bit with the software. I wrote down a simple design for a form based application and decided to struggle. In about 20 minutes, I had gone well beyond my original design and had learned far more than I anticipated. Better still, I had discovered some of the workflow patterns of how Flex Builder correlated to changes in the raw MXML. Not to say that a good manual isn't handy, but some aspects of learning software must be learned through trial and error.

I studied Civil & Environment Engineering in College and learned allot about subjects that I would never use in my chosen career. I learned about groundwater pollution, waste management, traffic analysis, organic chemistry and lots and lots of math and physics. It took some time to see it but engineering school had not intended to teach me the subject matter, but rather, had enhanced my ability to learn complex technical subjects without getting frustrated. Curently I could barely tell you about the first week of organic chemisty, but I can learn a new technology or language when given a problem and time to struggle to make things work.

Having worked in software since college, I keep finding software development is near constant problem solving. If you take any project or aspect of a project, it can be broken down into a large set of simpler problems. It is the programmers task to digest the problems and organize a solution that addresses each. The dilemma is that most problems and their hidden structure can only be understood through real world trial and error or stated positively, experience. Struggling with a real world problems generates the experience and understanding of the problem at hand.

My Turkish CD's are made by Rosetta Stone and they teach you a language without native language translation (There is no English in the Turkish disks). The design allows you to learn the way we all learned our very first language, seeing, doing, struggling to understand and comprehend. The disks show you pictures and phrases and allow you to discern context of verbs and nouns through audio visual techniques. The learning technique is brilliant and I have found myself digesting more than I every could in a classroom.

Next time you find yourself in a learning situation, create a real world problem and struggle to find a solution. You will learn more about the problem and the medium than you can from a book. Make sure you do not give up, for me the struggle is the most valuable aspect of the expierence. If you understand how things work, solving deeper problem becomes much easier.

I keep wondering how to translate "struggle learning" into a learning medium for technology. Any thoughts?

Cheers,

ted ;)


FireFox Preview Release

DIGG IT!     1 Comments Published at 5:42 AM .

In the land of 50MB downloads, it is nice to see a 4.5Mb download that contains such a great piece of software. The FireFox/Mozilla crew has out done themselves with this release and I am switching.

Now I am Flash biased and Mozilla and early FireFox browsers had trouble with some aspects of Flash compatibility. I am glad to say that these are behind us although, it would be nice for Flash to ship with the FireFox browser.

Kudos to the FireFox team, nice work! ;)

Cheers,

ted ;)


FLOW XRender Example

DIGG IT!     0 Comments Published Friday, September 10, 2004 at 6:09 AM .

FLOW is a layout/application engine for Flash that allows you to draw both data and movieclips to stage. XRender provides an XML interface to FLOW allowing you to author in XML and render at runtime.

FLOW is divided into 2 parts. The methods that handle the recursive rendering and handlers. Handlers define the tag elements and define how the arguments are interpreted and instantiated. You can support new elements by adding functions at _global.flow.xrender.handler['myhandler']. This allows the renderer to be infinitely extensible allowing old and new components to be supported. I have tested support with all v1, v2, and ghostwire components and they all work seamlessly in both Flash player 6 & 7.

XRender Sample:
FLOW XRender Sample
Using the tags defined below build a layout in XML and press 'Render'. This sample always renders to _level0 although it is possible to target any MC of a movie and render content there as needed. Rendering to different targets allows a portion of an interface to be updated like a table or dialog without a predefined frame or movieClip. Also since XRender works at the movieClip level there is no reason it cannot be used within components themselves.

FLOW XRender Sample Source

Supported Elements:
<mc/> or <movieclip/>
Example: <mc name='myOuterClip'><mc name='myInnerClip'/></mc>
Result: 2 Empty MovieClips are added to the stage with the instance names provided.
Def: Adds a MovieClip to stage. As MovieClips are container elements you can add tags internally to create trees of movieclips. All base movieClip properties are supported : _x, _y,_rotation,_width,_height, etc.

<button/> or <mx:button/> or <mx:controls:button/>
Example: <button name='myOuterClip' label='Hello World'/>
Result: Button is added to Stage with label.
Def: Adds a Button to stage supporting all Button properties.

<number/> or <n/>
Example: <n name='counter' value='1234'/>
Result: Variable 'counter is created as a number.
Def: Adds a number variable to the stage path.

<string/> or <s/>
Example: <s name='myName' value='Ted Patrick'/>
Result: Variable 'myName' is created as a string.
Def: Adds a string variable to the stage path.

<boolean/> or <b/>
Example: <b name='myBool' value='1'/>
Result: Boolean 'myBool' is created.
Def: Adds a boolean variable to the stage path.

<object/> or <o/>
Example: <o name='myObject'/>
Result: Object 'myObject' is created.
Def: Adds an Object to the stage path. Inner elements are rendered also.

<array/> or <a/>
Example: <a name='myArray'/>
Result: Array 'myArray' is created.
Def: Adds an Array to the stage path. Inner elements are rendered also.

<reference/> or <r/>
Example: <r name='myFunctionInstance' value='_global.myFunction'/>
Result: Reference to the function _global.myFunction is created.
Def: Adds an reference to the stage path.

This is a single aspect of FLOW as different handlers produce different effects. Assuming I use a persistent handler to render a component, when the component is rendered again it will be restored to its prior state.

Next week, I will show you some of the persistence codebase with FLOW and a linear and tree based form engine using the persistence handlers. I will also touch on events and some of the design classes in FLOW.

Hopefully this will be useful in your workflow as it simplifies writing lots of movieclips and data to stage.

Cheers,
ted ;)


PowerSDK PRIM is FREE and OPEN

DIGG IT!     0 Comments Published Wednesday, September 08, 2004 at 6:02 AM .

PowerSDK PRIM is now FREE and sports a new BSD License. PRIM contains 52 new getter/setter primitives in 100% pure ActionScript. The new primitives behave in a unique manner as the values are managed through get and set operation. PRIM is a general framework for creating primitive types within the player and is extensible. Even better is the included event model, allowing you to receive events when a primitive value is modified without watching or polling the value for changes.

Documentation and Download

PRIM was a blast to build and was especially enjoyable in regards to working with the Beta group earlier this summer (May-June). Although PRIM was clearly not a commercial success, I am hopeful that in making PRIM free it will get used in important Flash projects. Hopefully it will help you at some point in your development work when the base player primitives seem inadequate.

Special Thanks to the following for assisting with PRIM's development on the beta group and beyond:

carbon - Abdul Qabiz
hydrogen - Casar Tardáguila
oxygen - Darron Schall
helium - Eli Willaert
iron - Francis Bourre
lithium - Javier Tardáguila
uranium - Jesse Warden
gallium - Jonas Galvez
nitrogen - Julio Rodriguez
floride - Lance Linder
boron - Matthew Warneford
silver - TaeShik Kim
argon - Peter Hall
zinc - Sascha Müller-Neuhaus
nickel - Elan
bronze - Jos Yule

*beta passwords were based on the Periodic Table with little correlation to the contributor. (No Jesse AKA:JesterXL is not radioactive)

Special thank for supporting PRIM and challenging me to write better software, it was a great learning experience for me and hopefully for everyone. Thanks, Ted ;)

PRIM Lesson: "Software that doesn't get used is not very good software!"

Cheers,

ted ;)


Nested MovieClips in Bulk

DIGG IT!     0 Comments Published Tuesday, September 07, 2004 at 11:05 AM .

One of the recurring problems with Flash is that there is no structured way to layout movieClips in bulk in a consistent programmatic manner at runtime. Although we can pre-build all the layouts in separate frames or movieclips, there is a distinct disadvantage in that an existing app must be recompiled to extend or modify the layout. Assuming that Flash had programmatic extensible layout engine, the range of possibilities expands dramatically. This is essentially the goal of the FLOW project.

Ideally with minimal assets in the library, just components, one could render a layout and re-render a layout at any node (movieClip) based on data. This would be similar to allowing a web page to re-render a whole page or a certain aspect of a table without a full page refresh. In one sense you gain the ability to easily script many components in a particular layout and in quite another, you can render internals of a component.

With Icon Builder, I made an important discovery in how to integrate this sort of nested rendering. Icons made from Icon Builder are ASCII strings that are rendered through the drawing API, as such they require a container movieclip. I was asked late in the project how Icons could be integrated such that they would act identical to Movieclips, but without the linkageID or library asset.....

Four days later over beers....Ding!

Instead of adding each icon to the Library under a linkageID, you could inverse the problem and instead interpret arguments passed to the attachMovie method. By replacing the attachMovie default method with a backward compatible substitute you can support extended functionality when attachMovie fails, but before execution is returned. This allows you to perform allot of work in the middle of the execution of attachMovie, potentially adding 50-100 movieClips and TextFields based on an XML document.

Wrapping AttachMovie Example:

a = MovieClip.prototype.attachMovie

MovieClip.prototype.attachMovie = function(){

var mct = MovieClip.prototype.attachMovie.old.apply( this, arguments )

trace("Mid attachMovie Execution!")

//test mct for failure or do something else!

return mct

}

MovieClip.prototype.attachMovie.old = a

delete a

_level0.attachMovie('ted','ted',0)

What is interesting about this solution is that it is easy to make work in a recursive pattern by cascading nested rendering to inner executions of the attachMovie method rendering down the tree. Also this needs to be open and extensible allowing new components, classes, or movieClips to be supported easily.

What really became interesting in FLOWS's development is when data enters the picture. Applications always represent the memory state both components (visual) and data and if you can render both (in proper instantiation order), you can create powerful applications quickly from ASCII Text (XML). It even becomes possible to save state in particular application without the mess.

The Flash Player organizes content in a tree structure that changes over time. Anytime you are viewing a movie, you can always represent the content you see as a tree. Although strangely, it is the inability to duplicate the tree dynamically at runtime that I see as Flash's next big challenge.

My current thinking is to put both FLOW and PRIM into public hands under and open source license and do consulting! ;0

Cheers,

Ted ;)


On the Hunt in Washington, DC

DIGG IT!     0 Comments Published at 7:22 AM .

After a long and needed break, my wife and I are settling into Washington, DC. As such, I am looking for Flash project work in the DC/VA area.&

I am looking for an application-oriented Flash/Central/Flex project(s) either as contract or full time employment. If you know of a position, please send me an email ted@powersdk.com.

Thanks in advance,

Ted ;)


Where to find me:

Ted on Twitter - @AdobeTed
Ted on Adobe Groups
Ted on LinkedIn
Ted on Facebook
Ted at Adobe


Latest

Lists

Links

Jobs

Flex Jobs
city, state, zip

Archives