Tag Archive: AIR


Flash and Flex Developers' MagazineIf you’re into developing for Flash, Flex or AIR you have to check out this magazine. The Flash & Flex Developer’s magazine is chocked full of technical articles and tutorials that will get your mind cooking on some new F/F development.

The latest issue has some great stuff inside including an article for developers new to Flex and some really neat tutorials with using Yahoo! Maps in Flex

I have been picking up issues for a bit now, and I have yet to be disappointed. Check it out for yourself at: http://www.ffdmag.com/

Adobe FlexIn an Adobe AIR app I am working on, I need to programmatically disable / enable a items in a menuBar component, based on Internet connection status. I already have a function that listens for changes in the online status and updates a global variable when it changes, so I know when I loose an Internet connection. Now, I just need to change the disable / enable properties in my menuBar. After several tries, I figured out what I needed to do.

First here is my setup:

In my main MXML file, I have the actual Flex MenuBar component with properties. That line of code looks lke:
<mx:MenuBar x=”0″ y=”0″ id=”cbMainMenu” labelField=”@label” showRoot=”false” width=”100%” buttonMode=”true” dataProvider=”/assets/menu.xml” />

The dataProvider is an XML file that looks like:

________________________________________
<?xml version=”1.0″ encoding=”UTF-8″?>

<mainmenu>
<menuitem label=”File”>
<submenuitem label=”Quit” enabled=”true” />
</menuitem>

<menuitem label=”Help”>
<submenuitem label=”Online Help” enabled=”true” />
<submenuitem label=”Contact Support” enabled=”true” />
</menuitem>
</mainmenu>
________________________________________

In my project, anytime I detect a change in Internet status, I want to set the “Contact Support” option to disabled/enabled.

So to get access to that here is the dot syntax:
cbMainMenu.dataprovider.source[0].menuitem[1].submenuitem[1].@enabled = false;

To break that down it’s:
+ cbMainMenu is my MenuBar component’s ID (change this to match yours)
+ dataProvider is the XML file I have pasted above
+ source[0] is a reference to the actual data in the dataProvider
+ now I just walk the XML tree, skipping the root node, with menuitem[1].submenuitem[1]. That gets the 2nd sub-menu item of the 2nd menu item (remember the count starts at zero)
+ Last is “@enabled” which is the enabled attribute (@). It could have just as easily been @label to change the text.

bee_icon.pngSo today I tried to use a new desktop tool for writing blog posts. I tried Bee, an Adobe AIR app that is posted on the AIR samples page. Bee is an AIR application built on HTML/Javascript using a number of javascript frameworks and libraries including Prototype, script.aculo.us, Spry, TinyMCE, and Walter Zorn’s Tooltips for Javascript. The interface and features of Bee are very attractive. In addition to being an AIR app, Bee is a FREE app. It connects to your WordPress blog and like most other tools it pulls down your existing posts and lets you add new ones of course. One of the other cool features is it also connects to your Flickr account and uploads pictures to existing sets there as well. Plus you can very easily add a Flickr image to your blog posts. That was to me a really nice feature. The interface is well done too. The two main states slide horizontally back and forth making getting to your information very simple.

BeePhoto.tiff
BeeBlog.tiff

So if this app is so great, why am I posting from my old faithful app, ecto? Well Bee has a few little issues that kind of make it difficult to use.

Issue #1: Bee repeatedly pops up a warning box telling you that due to some issues between Flex B2 and B3, you will need to go to the settings panel and log into your blog or Flickr account. While this is annoying, I was willing to close it. However, whatever this message alludes to, there is no way to log into your accounts in the settings panel. There is only the option to set them back up. This leads me to issue #2

Issue #2: Bee kept loosing the connection to my Flickr account. It seemed to remember my WordPress settings just fine, but every time I launched it there was no Flickr account set up. Again, while I guess one could live without the Flickr connection, it was to me one of the most appealing features.

Issue #3: Here’s the rub. While Issues 1 and 2 are things I would work around, this one wasn’t. Every time I tried to publish a new post Bee would either tell me it failed or just pop up the publich window and then close it. So not being able to publish an article is kind of a deal breaker here.

I posted the issue on the Bee forum page and hopefully somebody can give me some suggestions. I do really like this app so far, outside of the issues. I also like that its an AIR app and I like supporting that. Oh well I guess I got what I paid for here. :(

Twitter Logo

So I started Twittering again. Not sure why just did. If you’re not familiar, Twitter is sort of like an online one way chat system. You have groups of friends and you shoot out messages much like texting. You don’t really expect to get a reply back, but you can. What’s really neat about Twitter is that it has a really great API that you can use to make all sorts of apps. So I was using the desktop application Twitterrific from the Iconfactory to send my tweets out before. This time I decided to try an Adobe AIR based application. While there are MANY of them out there, I settled for now on Spaz from Funkatron. Its a light weight AIR app that uses the Twitter API to send messages out. Also, worth checking out is TweetStats.com. For free they will generate a little page of charts of how much you tweet. Here’s my page. Its all very geeky but sort of fun. Try it for yourself!