This blog isn't maintained anymore. Check out my current project, an agile/scrum management tool.

Friday, August 31, 2007

Happy email

"FM/Edinburgh passed GM tests - ready for media tests on Tuesday"

That was the title of an email I just received. While it probably doesn't mean anything to anybody else, it was the best bit of news I've gotten in a month.




I guess it's been a slow month.

Thursday, August 30, 2007

XRayViewer download page

Yesterday, I wrote about the XRayViewer AIR application.

There's now a download page with a slightly updated version. Any future releases will be there.

http://www.rogue-development.com/xrayviewer.xml

Labels: , ,

Wednesday, August 29, 2007

XRay Viewer

A lot of the time a designer gives me a swf, and I want to know how they structured it. I have two options.

1) Open up the Flash IDE and explore it
2) Add an instance of it to my project, and then use XRay to explore it.

Now, I have a third option. I can open it up in the XRayViewer AIR application I just put together and then use XRay to look through it.

XRayViewer.air

All this little app does is host the XRay connector and let you load a local swf (File->Open). Then it displays the swf with some simple controls to play/stop/advance/back.




But the real power is you can go off to the XRay interface and look through that loaded swf!

Labels: , , ,

Saturday, August 25, 2007

AgileAgenda progress

With the release of AlivePDF, I've started on the printed reports of the project, arguably one of the most important features of software like this. Here is a sample report for the first few hours of working on this stuff. I'm quite pleased with how easily and quickly it was to develop that. It needs a lot of work visually, but I think it's actually a useful report. When printing these out you can choose which sections of the report will go in. Eventually I want to get the outline/bookmark PDF features working to make it easy to jump around in the document. I still have to tackle printing out the gantt style chart, but that's for another day. (Note on sample... that project is an amazingly simple project not really needing software like this. I've also been using this software for a project I've been working on at my "real job" and that is actually useful)

I've also been working with a young designer from France on some of the visual aspects of the software. He's been making icons for a while now and agreed to let me use some of them in my project. On top of that he did a mockup on a screen that took my thoughts on design to a completely new direction. He's working on a project of his own as well, I'll make sure to post about it when it's ready. Here's an example of what the software might look like come release time:



Even that look still has a couple rounds of revisions left, but it's getting closer.

We're still accepting beta applications for anyone interested in trying this stuff out in the first round of beta.

Labels: , ,

Friday, August 24, 2007

AlivePDF Flex/AIR Example

It took me a couple minutes to figure out how to write a PDF to disk using AlivePDF, hopefully this short example will save you those few minutes.

public class ProjectPDFExporter

{
private var filename:String = "test.pdf";
private var pdf:PDF;

public function exportPdf(filename:String) : void
{
this.filename = filename;

pdf = new PDF();

pdf.addEventListener(Event.COMPLETE, onComplete);

pdf.setDisplayMode (Display.FULL_PAGE,
Layout.SINGLE_PAGE);



pdf.addPage();
pdf.setFont( FontFamily.ARIAL );
pdf.addText("My Teax",1,10);
pdf.setFont( FontFamily.ARIAL , "", 32);
pdf.addText("Some more text",10,30);

pdf.finish();
}

protected function onComplete(event:Event)
{
var f:FileStream = new FileStream();
var file:File =
File.applicationStorageDirectory.resolve( filename );

f.open( file, FileMode.WRITE);
var bytes:ByteArray = pdf.getPDF()
f.writeBytes(bytes);
f.close();
}
}

Also, it looks like the first version of AlivePDF.swc is missing at least one class (FontFamily), so you're probably safer using the source instead of the swc for now.

The more I look into it, the more I'm impressed by this library. I'm really surprised Adobe had never made something similar before.

Labels:

Generate PDF's from Actionscript!

Thibault Imbert has released the first alpha version of AlivePDF which allows PDF generation through Actionscript. I'm hoping to be able to use this library for most of my "print" needs in the future since it's pretty easy to generate a pdf and then open a reader on it.

Labels:

Wednesday, August 22, 2007

Mysterious flex compiler error

1119: Access of possibly undefined property someOtherMember through a reference with static type SecondClass ...

Sometimes, the flex compiler just decides to start throwing this error around. It's usually on a line such as:

SomeClass.someMember.someOtherMember = "Hi";

With some simple definitions like...

class SomeClass
{
public static var someMember:SecondClass;
}

class SecondClass
{
public var someOtherMember:String;
}

A clean-build will often make the reported error go away. But sometimes it won't. The error will start happening at seemingly random times when I've been working on completely unrelated sections of the code. One compile everything is fine, then the next it just starts complaining when nothing related was changed.

It happens in FB2, FB3 (using the FB2 SDK), and when compiling from the command line using the FB2 SDK. I haven't seen it using the FB3 SDK, but that doesn't help me since it happens fairly infrequently.

This is a compile-time error, not a run-time error, so it has nothing to do with variables not being initialized. There's no other errors (or even warnings for that matter) in the project.

Labels:

Monday, August 20, 2007

Debugging a screenweaver application in Flex Builder

To debug a screenweaver application in Flex Builder on OSX I do the following:
  1. In your main screenweaver app, add in a command line parameter (-swf) to specify the swf to use. This will let you specify to load the debug version of the swf.
  2. Create your ScreenWeaver bundle however you normally do.
  3. Create a shell file called launch.command (the extension .command is neccessary) next to your bundle
  4. In launch.command enter in a command to launch the app. I use something like:
    /somepath/MyApplication.app/Contents/MacOS/swhx -swf MyApp-debug.swf
  5. Click the little tiny arrow next to the debug button on your FlexBuilder toolbar.
  6. Select "Other..."
  7. Select your application on the left.
  8. On the right, uncheck "Use Defaults"
  9. Set the "Debug" line to your launch.command you created





Now, you should be able to debug your application. It should launch in your screenweaver shell and full debugging functionality from Flex Builder should work correctly.

This should work on windows if you replace the .command with a .bat file.

Our Screenweaver app will load a default non-debug swf if no "-swf" parameter is passed. That way the loader doesn't have to change for production vs. debug usage.

Labels: ,

Friday, August 17, 2007

Waiting on Flex Builder


Right now, as I post this, I'm waiting for FlexBuilder to do whatever it is that it does. I've looked around but have yet to find a suggestion on why occasionally it'll just take a minute or more to refresh & build. Arghhh.

Some suggestions that have made it better for me (but not 100% better)...

Project->Properties->Flex Applications ...
make sure only the ONE main mxml file you care about is listed there.

Project->Properties->Flex Compiler ...
Turn on "Generate HTML template".
Turn off "Copy non-embedded assets" (if you do that, you'll have to remember to refresh your assets by copying them to your bin folder when they change.)

There's certain JRE versions to stay away from, when I upgraded to 1.6.something it got a lot better for me.

Occasionally, edit your .actionscriptproperties and remove "weird crap" that's in there. I've seen refereneces in there like "src/src/src/src/src/src/src" for some unknown reason.

Labels:

Thursday, August 16, 2007

Designer + Developer

Relatively speaking, I'm pretty new to the Flash world. I never slugged through the AS1 days like many of the seasoned warriors out there. I've only worked on a few large Flash projects, and I've generally always worked in the same way.

I had a designer (or designers) who knew flash and were able to create .swfs for me to use. Then I wrote my code (in Eclipse+MTASC) that would load and manipulate those assets they provided. I'd use XRay to figure out how things were structured or named. Occasionally I'd have to remind them to add instance names, or not to name multiple things the same thing, but very rarely would I ever fire up the Flash IDE. Sometimes we'd have a pre-design meeting to talk about things like structure or file naming or whatever, but it was always pretty generic stuff

Lately, I've had two different encounters with other developers who work in a completely different fashion. They take the .fla from the designer, completely rip it apart, and then put it back together in a way that makes sense to them.

Now, I know some designers just aren't capable of making a logical structure for their assets, but some can. In fact, those two encounters I mentioned the designer was the same guy I usually work with and I know he did the same sorts of things I expect from him.

The problem with ripping it apart and putting it back together is now, the next time the designer changes something you need to somehow propagate those changes from the designer's work to your own work. I couldn't imagine I'd ever want to take on the role of managing versions of assets within a file during development, even if that meant the assets weren't made how I would have done them.

So it confuses me when a developer will just automatically start in that style of development no matter what the asset structure looks like. Even if stuff wasn't delivered in a logical manner, I'd want to work with the designer instead of just ripping it apart myself.

Maybe I just haven't been bitten by poor designers like others. Maybe my software engineering background makes me fundamentally think different from the flash developers who come more from a design background. How do you guys prefer to work. Is that different from how you actually end up working?

Oh well.. I guess that's my little rant for the week.

Labels: ,

Sunday, August 12, 2007

Image/screenshot viewer with hotspots

Yesterday, I found myself wanting to post some screenshots of a project I'm working on, but I wanted to be able to define "hotspots" on the image that would display more information upon mousing over them. Here is what I came up with:

http://www.agileagenda.com/tour/FeatureDisplay.html

But that's not the cool part. The cool part is in only a couple hours, I was able to extend that viewer into an AIR application that could edit the XML config file. Here's some screenshots of that tool:


I'm using ObjectHandles to handle moving & resizing the hotspots. Then I'm using a simple RichTextEditor to edit the text that is displayed upon mouseover.

This tool needs some work, but I could see it being useful to other people someday.

Labels: ,