nothing yet | jason madsen

10 Dec, 2009

Adobe Air Version Checker

Posted by: jason In: All

So I had a bit of an annoying morning today. I went to update from AIR 1.5.2 to the latest release (1.5.3). The process didn’t go so smoothly. Long story short the updater would just hang up and sit there. I tried uninstalling 1.5.2 to get a fresh version of 1.5.3 rather than an update. No luck, the uninstaller wouldn’t work. I kept getting error messages about possibly not being an admin on my machine. Not true, I am the admin…. So what to do… Looking around the interwebz, it doesn’t seem like others are having the same trouble.

I checked permissions, restarted. Tried again, no luck. Tried again, and what? It tells me that I already have 1.5.3 installed. Huh? On which of the failed attempts did that happen? So I thought I would check the version number somehow. After a bit of googling. I found no easy way to verify the version number. You can do it programatically from within ActionScript. To do so you simply look at the following:

NativeApplication.nativeApplication.runtimeVersion

Looking at that property from within your IDE will tell you which version of the runtime you have in your installed SDK. To see which actual version of AIR is installed for AIR apps that you are running on the machine you need to execute the code within that environment.

So I built a quick little widget that displays the installed runtime version. Nothing too fancy here, just a utility. Feel free to install and use it via the badge installer below…

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

You can install the widget from the install badge above, or you can download the .air installer here

05 Nov, 2009

Creating ASDocs in Flash Builder

Posted by: jason In: All

Over the last year or two I have seen several different methodologies on creating ActionScript documentation using ASDoc. Jesse Freeman shows a quick example of creating documentation using ANT tasks in his recent article 5 Tips for Documenting Code . ANT tasks are nice in that they can be transfered with the code base as it moves from developer to developer. When I need to quickly create ASDocs however, I typically use the External Tools dialogue directly in Flash Builder.

I thought I would document how to create a simple ASDoc configuration within Flash Builder’s External Tools dialogue.

External Tools

In Flash Builder, select Run –> External Tools –> External Tools Configurations

External Tools

Create a new configuration by double clicking on the “Programs” button. Next, give the new configuration a name, I’ll choose something generic like “Generic ASDoc”.

Location

The External Tools Configurations window needs a bit of information. The first is “Location”. Select the “Browse File System” button and locate the the asdoc compiler.

On a Mac it is typically located at:

/Applications/Adobe Flash Builder Beta 2/sdks/4.0.0/bin/aasdoc

On windows (XP) I believe it is located at:

C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\bin\asdoc.exe

I don’t have a PC to test this with currently, so if I am wrong, please feel free to correct me.

Working Directory

Next we need to add our “Working Directory”. You can think of this as your base directory, the directory from which any relative paths will be resolved. For this field I typically want it to be my “src” folder within the project I am working on. Eclipse has some interesting variables that can help here. You can see them by clicking the “Variables” button. I usually end up with my working directory set as “The currently selected project’s ’src’ directory” like so:

${project_loc}/src

ASDoc Arguments

Lastly we need to add the necessary compiler arguments for ASDoc. I’ll document the basic arguments here, and then point you toward a more in depth resource created by Adobe that discusses all of the arguments.

-source-path
In this example I will set this to a period (.), meaning the same directory as the “Working Directory” from the previous step.

-doc-sources
Again here I will set this to a period (.), meaning document all of the classes found within the source path (which in this case is our ‘src’ folder)

-output
This is the directory in which ASDoc will build the documentation. If the directory doesn’t exist, ASDoc will create it for you. You could also use a relative path (relative from the Working Directory). I’m setting it to DOCS, meaning that it will create a directory named “DOCS” within the “src” directory.

Basic Settings

Other compiler arguments you can use

For simple projects the previously named compiler arguments should get you started. There are several other arguments you may need. I’ll list a few of them here

-window-title
This argument takes a String, be sure to enclose your value within double quotes if it will contain spaces. The -window-title argument gets concatenated to the HTML title tag.

-main-title
This argument also takes a String (use double quotes for spaces). This argument value gets placed at the top of the documentation HTML

-library-path
A relative path to any SWC file dependancies. For example if you have a SWC file being used in the build path of your project found within the “libs” directory you would add “../libs” as the argument.

-exclude-classes
The fully qualified name of any class file that you do no wish to have included in the documentation

Running your configuration

When you have your configuration set up, select “Apply”, and then “Run”. You should see some feedback on the documentation process in Flash Builder’s console. From now on, you should see the name of the configuration when you select Run–>External Tools. Selecting the configuration will run it. You can also run the configuration from the toolbar icon as well.

More Info

For more information you should check out this document created by Adobe that discusses options for using ASDoc including both compiler arguments and options for commenting your code.

Tags: ,

25 Aug, 2009

Flash Camp Atlanta

Posted by: jason In: All

A couple of things fell together for me in the last few days, and I started thinking about attending Flash Camp Atlanta. I posted on twitter that I was trying to work things out to attend. Turns out an email from David Tucker was just the motivation I needed, and I am officially going. As part of that, I was asked to help out during the Introductory Session by giving a “Introduction To Flex” presentation. There are some great speakers lined up for this camp. You can see a listing of speakers and the schedule here.

I’m excited to be going to ATL. The last Adobe event I attended there was the “On Air Bus Tour” a few years back. My impression of the Flash / Flex community there has always been a good one, and based on some recent Twitter chatter it seems that there are over 200 tickets sold. Should be a great event. If you are in the area, or want to get away for a few days it looks like there are still tickets available.

See you there.

Jason

21 Aug, 2009

Adobe Max 2009 – Widget

Posted by: jason In: All

So there is an interesting widget that has been developed by Adobe ( I think the credit should go to Adobe Evangelist Serge Jespers, but I’m not sure if anyone else was involved). The widget displays facts from previous Adobe Max conferences and Testimonials from people. You can even record your own testimonial from within the widget. I thought I’d put the widget here on the site for people interested. Click the “?” button in the top right hand corner to see how to win a trip to Max. You can add the widget to your site or blog by clicking the “Get Widget” button in the bottom right.

Pretty cool widget. I’ve been following Serge on twitter, and know he’s put a lot of work into the project. The end result seems to have paid off.

Jason

29 May, 2009

Flash Camp Orlando

Posted by: jason In: All

We are about half way through Flash Camp Orlando. This mornings keynote was given by Greg Wilson who showcased the latest Flash Catalyst and Flash Builder builds. Pretty cool looking stuff. I am looking forward to getting into both of those apps.

I gave my presentation, “Making the jump to Flex”. I didn’t quite get a chance to show all of my examples, but as promised, here are my slides in .pdf form and Flex Builder project archives. The flex examples are pretty basic, but if you are just getting started with Flex, maybe you will find them helpful. I’m also posting the actual keynote slides ( as in .key, not .pdf ) the keynote is a bit large (17MB).

David Tucker’s presentation on AIR data persistence was great. We’re just now getting started with Carl Smith covering user experience.

So far so good. I’m digging the Flash Camp Orlando.

Jason

21 May, 2009

Flex Builder has trust issues

Posted by: jason In: All

When you create a new project in Flex Builder, the IDE updates a config file buried in the preferences that marks the project’s ‘bin-debug’ folder as a trusted resource. In so doing when you run the project you are able to access local resources (i.e. a local XML file), and remote services at the same time. When you import a Flex Builder archive it is supposed to update the same config file with the ‘bin-debug’ folder of the newly imported project.

There is an apparent issue with Flex Builder (I am running FB on a Mac, but apparently it exists on Windows as well) in that when you import, move, or rename a project, it doesn’t update the config file. When the config file isn’t updated and you try to load a local resource the player will throw a “Security Error”. This isn’t a problem if you are only using local resources ( -use-network compiler flag ). But when you need to access local files and remote files or services this can be a real pain.

I had some time recently, and decided to look into the issue. In doing so I came across a couple of past articles:

This one by Mark Walters, and this one by Jesse Warden

The fix is easy enough, go add the path of your bin-debug folder to the config file. In case you skipped the links, you can find the file in the following location:

Mac:
/Users/userAccount/Library/Preferences/Macromedia/Flash Player/#Security/FlashPlayerTrust/flexbuilder.cfg

PC:
C:\Documents and Settins\userName\Application Data\Macromedia\Flash Player\#Security\FlashPlayerTrust\flexbuilder.cfg

Updating the config file isn’t too big of a deal. However, to expedite a quicker fix, I have built an AIR app called bugrd! that will add a project’s debug folder to the config file for the user. Once the app is installed you simply drag your project folder and drop it on the interface. The interface will confirm the project that you have selected. Click the ‘un-bugr’ button, and it adds your debug folder to the local trusted list in the config file.

I am assuming that this will be cleared up some time (Flash Builder 4?), until then hopefully this’ll speed up the process.

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

You can install the bugrd from the install badge above, or you can download the .air installer here

Jason

Tags:

05 May, 2009

Flash Camp Orlando

Posted by: jason In: All

Universal Mind and Adobe have announced Flash Camp Orlando, a full day event happening May 29th. I’m excited to have the mini conference here in my backyard. Tickets are available for $50 and include entrance to the event, parking, lunch, and door prizes. As I understand, the recent camp in Miami sold out, so go get your tickets now.

The local Adobe User Group (Adogo) has a raffle for a few free tickets as well. You can find more details at this post on the Adogo blog.

There is an impressive line-up of speakers including David Tucker, Andrew Powell, and Christian Saylor all from Universal Mind. As well as Greg Wilson from Adobe.

I’ll be presenting “Making the Jump to Flex”, an intro into migrating to the Flex Framework. Over the next few weeks my hope to is post a few brief articles aimed at getting up to speed with the basics of the Flex Framework.

In the mean time check out the speaker line up, and get your ticket.

11 Dec, 2008

DocBuilder Source Code

Posted by: jason In: All

I had a person or two ask about building Flash extensions and or want to modify the DocBuilder for their specific purpose. In response I’m putting up the source files for the DocBuilder as a reference to get people started. Building Flash extensions in my experience involves creating a Flash interface, and using that Flash interface to execute JSFL (JavaScript for Flash) functions. So you create a Flash interface, and then a JSFL file with functions that it will execute. You then create an xml file that is used by the Extension Manager to build your extension. Considering how simple it is, I’m surprised that there isn’t an overwhelming amount of extensions talked about.

If your interested and just getting started, Lee Brimelow posted a getting started video tutorial a while back at gotoAndLearn

09 Dec, 2008

Introducing the DocBuilder

Posted by: jason In: All

DocBuilderA few years ago, I built a simple extension for the Flash IDE that would auto generate class files for me. I used it for a while, but shortly there after moved to Flex Builder as my editor. At the University, the OOP course I teach, starts out in the Flash IDE for a few weeks, and then moves to using Flex Builder as an editor for ActionScript projects.

Lately I’ve just really dreaded the Flash editor. I realize that it could come off as spoiled, but I really dislike typing out the usual skeleton code to get a class file started. Tonight I decided that I’d had enough, so while the students were working on projects, I decided to update my extension. I call it the DocBuilder. It asks you for the package, class name, and what class you would like to extend. It then asks you to save the file in the appropriate directory to match the package. Viola!!!! Stub code generated.

Here is a screen shot of the outputted class skeleton:

Feel free to download the extension from here.

Update: I found and fixed a small issue where the help button gave an error. The linked file above is the latest version and seems to be working well.

jason

Tags:

18 Nov, 2008

Tour De Flex

Posted by: jason In: All

Tour De FlexSo originally my work was planning on sending me (and a few others) to MAX NA 08, in San Fran. Without sounding too bitter, they changed the plans on us. So we are left in Orlando reading blog posts, and news updates from the sessions. Hopefully Adobe will put the videos up on Adobe TV like they have been with some of the recent conferences.

Anyhow, in my readings about MAX, I have come across the Tour De Flex application that a few of the Adobe evangelists have put together. It’s an AIR application that gives you samples on using everything Flex, from the very basics, to some interesting third party components, and even some cloud API’s. It has working examples for everything. A great application. They even have a system in place to allow developers to showcase their own work through a submission process. I can see this application being helpful for people just getting into Flex, or as a reference for Flex developers for those ‘how does that component work again…’ moments.

There is also an Eclipse plug in. It allows you to search for components. It will bring up a list of search results, double clicking the result opens Tour De Flex and displays examples, and descriptions.

I’m going to put the install badge in the widgets bar to the right for a while. Feel free to install it directly from the badge, or visit the Tour De Flex page, where they have the same badge in effect.


  • jason: @Chris Nice find. I hadn't seen that article, thanks for the link. Jason.
  • Chris: Thanks Jason. I found this useful little Adobe knowledgebase article, which gives you a way to check the version of AIR on Mac and Linus systems: h
  • jason: Very cool. I remember now running into the Product Manager a while back while looking into AIR install badges, but never took the time to investigate

About

Jason Madsen Headshot

Jason Madsen is a Flash, Flex, ActionScript developer who teaches the Flex Framework and OOP Concepts at Full Sail University in Orlando, Florida.


aggregated by mxna