Access the protected TextField in TextInput control for Flex

Posted in Flash, Flex on July 26th, 2009 by eccheung4

The other day, I was struggling trying to get access to the textfield of a TextInput Control, which was protected. I needed it because I was loading an AS3 swf into a flex project and it needed to be passed a reference to a textfield to interact with it, but in flex it was a textinput control which contains a textfield. You can’t ues textInput.getTextField() because its protected.

To make it work you simply add:

import mx.core.mx_internal;
use namespace mx_internal;

I found out about it in this forum thread
http://www.actionscript.org/forums/showthread.php3?t=173666

Tags: , , ,

Facebook Connect and Flash AS3

Posted in Flash, Flex on March 26th, 2009 by eccheung4

Obviously Facebook is popping up everywhere and I’m sure a lot of companies will be looking to integrate it with flash. Pieter Michels has started a great effort in bridging Facebook Connect and Flash using Actionscript 3. He provides a simple example using Flex and AS3.

Pieter Michels post on Facebook Connect to Actionscript 3
Pieter Michels Code Library at github as FBFlashBridge

Example of Facebook Connect with Flash at http://connect.redbullusa.com/

http://developers.facebook.com/
Facebook Connect Wiki
Facebook Developer Forum

UPDATE 3/30/09: I just noticed this post while looking through Facebook documentation. Looks like Adobe and Facebook are officially working together to support Flash and Facebook.

ActionScript 3.0 Client Library for Facebook Platform - revamped open source version by Jason Crist
Adobe Developer Connection for Facebook - materials and samples

Tags: , , , ,

Flex Camp OC

Posted in Flex on January 23rd, 2009 by eccheung4

I just found out there is a Flex Camp event near me and its only $25 on Jan. 31, Saturday.  Now that its here, I’m still debating whether to go or not.  There just aren’t that many sessions that I’m really interested in or probably already saw something similar to at Adobe Max.  I haven’t even caught up with the video sessions I missed from Adobe Max.  For $25 though, its cheap.  If I have nothing else to do, I’ll probably check it out anyways.

Flex Camp OC

Tags: ,

Keyboard not working when fullscreen using AIR

Posted in Flex, Projects on January 22nd, 2009 by eccheung4

A while back I had a problem with the keyboard actions not working when I was in fullscreen for an AIR application. Luckily, the keyboard wasn’t really need for the app, but it would have been nice. So today, I just happened to pass through the documentation while I was looking something else up and found out that I just had to set

stage.stageDisplay = StageDisplayState.FULL_SCREEN_INTERACTIVE

instead of

stage.stageDisplay = StageDisplayState.FULL_SCREEN.

Tags: , , ,

Cairngorm

Posted in frameworks on November 14th, 2008 by eccheung4

After reading about the poll from insideRIA about what frameworks people use for Flex, I decided to look into Cairngorm a little more and now have a better understanding after going through a series about Cairngorm over at the Adobe Flex Developer Center. It gives a pretty good overview of Cairngorm and how it is used to build some e-commerce application. I went through it in about a day and have a pretty good understanding of Cairngorm now. Now I’ll need to look into the other frameworks….maybe after I try Cairngorm out on a project.

Tags: ,

AIR Application Install Error

Posted in Projects on November 6th, 2008 by eccheung4

Application Install

I was working on an AIR application for a golf tournament when this error popped up when I tried installing my application. “The application could not be installed because the AIR file is damaged.” That didn’t give me much information about what the problem was. After a couple hours of looking through my code, looking at the descriptor file, making changes here and there, and trying to install repeatedly only to get the same error everytime, I finally found a post on the subject on the web.

http://bugs.adobe.com/jira/browse/FB-10582

It turns out that my “Texas A&M” asset files that I included in the AIR project was the cause of the problem because it contains the “&” in the file name. Once I removed the file from the AIR project, it installed fine. So then I renamed my file and took out the “&”, and it worked fine as well. So just remember to check your file names for all assets if this error ever pops up. I would think that flex builder should catch this error when it packages up the AIR app.

One more note, when creating your install badge, you’ll need to put the absolute path to your .air application in the flashvars for “appurl”.

More Info at: http://www.tonynorcross.com/?p=13

Tags: ,