May 2nd, 2008
Update: I don't know if this pattern is accurate. In my case it works but at any rate please post your comments.
I spent quite a lot of time on this today so I thought I'd post this for myself and others. I was pulling in an HTML page as XML and I wanted to get everything between a specific tag. With E4X this would be easy. But after numerous attempts with no results I ran the HTML through a validator in Dreamweaver and found out that it was "malformed" XML. So E4X was out of the question. Now I thought it would be easy to just use a RegExp pattern I found online but because of nested tags of the same name it was not able to handle this. I'm not an RegExp expert but I've been using them for as long as I can remember. So I finally found one online and in a program called RegExp Buddy. RegExp Buddy clearly showed me that the pattern wasn't finding a match because it was over multiple lines. After reading more about the dot metacharacter in RegExp buddy I came across this line, "The dot matches a single character, without caring what that character is. The only exception are newline characters. ". Now we are on to something. So I read further, "All regex flavors discussed here have an option to make the dot match all characters, including newlines. In all programming languages and regex libraries I know, activating single-line mode has no effect other than making the dot match newlines." Seemed simple enough. So once I enabled single-line mode the pattern found a match.
Here is the code I used to find the beginning and end of a specific tag. This is in ActionScript 3:
Actionscript:
-
// create a pattern that grabs everything between a div tag that has a class set to "blue" including other div tags
-
// notice the s tag at the end of the pattern. this activates "single-line" mode
-
var pattern:RegExp = /<div\s*class="blue"[^>]*>(.*?)<\/div>/s;
-
var xmlString:String = event.result.toString();
-
var xmlStringMatch:Array = xmlString.match(pattern);
-
// I think because my xml was invalid I had to add the last two closing tags. that or the pattern needs updating.
-
// The results of the match are placed in an array. The first item contains the match
-
var parsedXML:String = xmlStringMatch[0] + "</div></div>";
-
// when you assign it to an XML variable it will error if the xml is invalid
-
var xml:XML = new XML(parsedXML);
If there's another method please let me know.
Posted in Regular Expressions, Flex, Flash | No Comments »
March 22nd, 2008
A close friend of mine told me a few years ago to drop everything I was doing in Flash and switch to Flex. We talked about it for a few hours over the next couple of days. It took a few weeks of research and a lot of soul searching to risk dropping everything and get into Flex. It wasn't long before I came to the conclusion that this is where I wanted to be. It is now two years later. During that time I've surveyed the Flex landscape and I've come up with somethings I think you'll like.
This week only I'm having a special for a new software package I have creatively titled "A lot of Flex Stuff for an insane price". It contains well over $1200 worth of new Flex related components, classes and examples that I'm offering for $399 prerelease price. This includes the source code on these products. Why am I doing this? For the lulz. And for feedback and to get the word out there. Take a look at it and let me know. Flex Prerelease Sale .
PS If you figure out what the Data Component is then you will not wait on this offer.
Road Map for 2008
Q1
Release commercial versions of the beta components in the Flex Package
This pack includes the HTML Component with source code, Icon Component aka Status Indicator, Data Component, Date and Time Component, Countdown Component (people love these things), Label Component, Position Class (you know when you are trying to position something in the center of the screen or container or upper right hand corner of the screen or wherever, this helps you), Wordpress Header project for adding your own SWF to your Wordpress blog, CallLater class (when you want to call a function after a predetermined set of milliseconds), Contact Form project (a simple contact form for your website), etc. blah blah blah etc etc etc so on and so forth.
After Q1
More components - TBD, etc
Calligraphy CMS - A Flex based CMS to go along with the Data Component
Richer Text Editor for Flex - Think of the features you'd like, I'm pretty sure they are already planned...
Shopping Cart for Flex - Basic shopping cart class or component for use with PayPal.
AS3 Physics engine - Complex multipoint collision detection among other requested features in a physics engine...
Alarm Clock 2000 - A better Alarm Clock in my opinion
Time Tracker 2000 - Time Tracking Software
The Flex Foundation - A site that receives enough income from subscriptions to address the needs of the Flex community. This means that as income comes in then resources come out. These so called resources would be in the form of components, examples, live Flex help chat, moderated Flex forums, moderated Flex mailing lists (or help answering questions on FlexCoders), live chat and forum support on open source projects, patching and maintenance of open source projects, contributers to Flex documentation and more. Feedback and investors please contact me here at http://drumbeatinsight.com/contact.
I'd like to setup the Flex Foundation, physics engine and the Richer Text Editor so any investors will help speed up this project.
Posted in Flex | 3 Comments »
March 22nd, 2008
I have been looking at the projects Adobe has been working on to integrate Flash and Flex and I decided to write a guide for myself. I wrote this during the Flex 3 beta and updated it over the last few days. Even so there may be technical inaccuracies or missing content. I'd like to hear about those so I can make it more useful.
From the project
This guide will help you use the power and features of Flash within your Flex project. You will be creating a Flex Component from your Flash project.
What this means to a Flash designer or developer is that you can take your design and animations and bring that into a Flex project.
What this means to a Flex developer is that you or a Flash designer can create your animations and designs and give a swc to you to bring into your Flex project as a Flex component or container complete with states, events, transitions and skins. This is without having to write code in Flash to do it, well, except if you need to dispatch events.
Note: This information was compiled from the official documentation from Adobe. Please read the Adobe documentation preferably along with this guide.
I had put this together using the beta version of Flex Builder 3 so there may be technical inaccuracies or incomplete information. For others sake please add feedback, questions, comments etc here.
Finally, here is the link,
Flex Component Kit Docs

Posted in AIR, Flex, Flash | No Comments »
January 1st, 2008
Visit this page for the latest information on installing Subclipse in Flex Builder. This is mainly a post for a reference for myself later.
http://subclipse.tigris.org/install.html
- Goto Help > Software Updates > Find and Install.
- In the pop up window select "Search for new features to install."
- click on the New Remote Site button
- In the pop up window enter:
Name: Subclipse 1.2.x (Eclipse 3.2+)
URL: http://subclipse.tigris.org/update_1.2.x
Click OK
- Make sure the site you added is selected and click Finish.
- The search results window will show you some products to install. Select Subclipse Plug in > Subclipse (version number here) and click Next
- Accept any license agreements even if its power of attorney and click next.
- The next window will show you the products to install. It should list Subclipse. Click Finish.
- You may have a Verification window appear warning you about installing an unsigned feature. Go ahead and just click Install.
You may be prompted to restart Flex Builder (Eclipse). Restart.
- Finally, after restarting Eclipse, the first thing you will typically want to do is open the Subclipse Repository perspective where you can define your repositories. Be sure to also check the online help as well as the Subclipse preferences located under Team -> SVN.
Posted in AIR, Flex, Flash | No Comments »
January 1st, 2008
Happy New Year! :)
UPDATE: The special is over but I have a new special being created right now. Please check it out at http://drumbeatinsight.com/super
As a holiday special I am putting the Label component up for free this month (January 2008). What is the Label? Well, its a Flex component that enhances all the other components in your app. Why is it free? One, I really like this component and want to see more people use it. Two, it makes increasing and decreasing text input fields (number fields) easy due to mouse wheel support, keyboard support and label drag / slider type support. And three, I think it will make Flex apps more professional over HTML forms. Whether you use all the features or not I think you will find something in it to like. Read more about it here, http://drumbeatinsight.com/label. Click download trial. Yes it says trial on the site but it is a full licensed copy you can use it in your commercial applications. You can get it now for free. Don't wait because after this month it will go back to regular price.
PS Some people have said this component was unintuitive blah blah blah. My response is that its an abstract component and you aren't used to it yet and don't know all the features it adds. It doesn't do much by it's self but it decorates the other components. BTW, this type of label is used in Adobe Photoshop and numerous popular Mac software. My suggestion is to just try it dudes. Put it in your application, setup the features you want to use and see if anyone (your clients and customers) notice.
PSS I try to keep this blog about Flash and Flex tutorials, tips and errors and will be back to those again soon.
Cheers,
Judah
Posted in Flex | No Comments »
December 31st, 2007
I'm not sure if newer TV's have this feature yet, but I it would be nice to have an option or button to dim the brightness. I know that people leave tv on when they go to sleep or other times just to hear the news. Besides convenience I think it could also save power.
Posted in General, Technology, Ideas | 4 Comments »
December 20th, 2007
Can you imagine what it would be like to create a Flex, Flash AS3 or AIR app or game and distribute it on the PS3, 360 or Wii??? Or all three? Or all 6 when you include the PC, Mac and Linux.
I want to bring this to your attention because this is one of features being debated in the next version of AIR. Developing for these platforms opens up so many more opportunities. What would it be like to develop a game or application that will run on all systems? In addition, with network connection you could play the same game across multiple systems.
You can voice your opinion and vote on this issue here.
https://bugs.adobe.com/jira/browse/FB-11304
Please follow this link and click the VOTE link.
Note: Please vote for any other issues posted by a user named "boobiestar". ;)
Posted in Games, Flex, Flash | 1 Comment »
December 13th, 2007
Until Flex Builder 3 Stand Alone includes Ant built in you will have to install it separately. Peter Elst wrote steps for installing it in Flex Builder 2 but in Flex Builder 3 the steps are slightly different. For those that are not familiar with Eclipse, this can be tricky to install.
The following is the revised steps for Flex Builder 3 Stand Alone.
Quoted and revised from http://www.peterelst.com/blog/2006/09/03/flex-builder-2-ant-support/:
-
Launch Flex Builder 3
-
Go to Help > Software Updates > Find and Install
-
Select "Search for new features to install" and click next
-
Select "The Eclipse Project Updates" and click finish
Note: If you do not have the option above click New Remote Site and enter "The Eclipse Project Updates" as the name and "http://update.eclipse.org/updates/3.3" as the url.
-
In the Eclipse Project Updates > Eclipse 3.3.2 (3.3.3, 3.3.4, etc) node select "Eclipse Java Development Tools..." and click next
-
Accept the license agreement and click next
-
Click finish to start download
-
Eclipse downloads Java Development Tools
-
Click "Install all" to install Java Development Tools
-
Restart the Eclipse workbench
That’s it! You now have Apache Ant support in your standalone Flex Builder 3 install.
Go to Window > Other View > Ant and Click OK. You now have the Ant view
Posted in Flex | 5 Comments »
November 20th, 2007
Amazing. Honda has just announced the availability of the first hydrogen cars on the market. The car runs on hydrogen and oxygen (from the air around us). When hydrogen in the fuel cell is mixed with oxygen in the air electricity is created that runs an electric motor. This electric motor produces zero emissions.
Some details:
How far does it go before needing to be refueled?
~270 miles*
When will it be available?
In summer 2008 in specific areas in California. Other locations to follow.*
How much will it cost?
they are going to start by leasing them. check their website for more details... *

Key quotes,
Honda has come out ahead by putting the first dedicated platform hydrogen fuel cell vehicles on the road. A true testament to Honda’s pioneering spirit, the evolution of the FCX Clarity is a story filled with determination and brave, creative solutions to seemingly insurmountable obstacles. And it’s all driven by Honda’s sense of responsibility to pursue clean domestic energy sources that promise bluer skies for our children.
Honda has brought the fuel cell vehicle from the lab to the fleet and finally to the public. The major barrier now is building up the hydrogen supply infrastructure. We have a strong interest in this area as well and we are hard at work perfecting a Home Energy Station that may supply power to the home as well as the family car. With these developments, Honda is paving the way for a clean and efficient hydrogen-based society of the future.
Congratulations to the Honda engineer team and Honda company! We are living in the future... I want one. :)
Read more here...
*Disclaimer: All information is gathered from the Honda website on Nov 20, 2007 and could change. Please submit corrections or read here for more up to date information.
Posted in Technology | 1 Comment »
November 6th, 2007
I was just reading about some of the new features in Flash CS4 and Flash Player 10 and 11 and I am really excited.
Flash CS4 (DESIEL) Features:
- new stage rendering core built on Player 10
- can see live video at authoring time
- better WYSIWYG on stage, less need to preview
- easier timeline use
- tweening bezier adjustment: no more keyframes (wow)
- 3D-style bones in shapes *and* movie clips
- inverse kinematics (wow)
- "Animating bones in Diesel (Flash CS4) is going to be as easy as tweening any other object."
more
watch video "flash next"
Flash Player 10
* Cross-domain component cache
* typed arrays
* encrypted video streams
* much better text flow
* 64 bit support
* multiple processor support
* full screen gpu support
* Flash Player 9 support on more mobile devices
Take a look at the future of ActionScript version 4:
the-future-of-actionscript
I feel like a dream of mine is being realized. With tools and technology like this you can create new worlds. I feel like the design, animation and development worlds are merging successfully. To take a design or animation and easily add functionality to it is an amazing accomplishment. I am truly excited. In the future I think we will more easily be able to create site's experiences like this one by Jonathan Yuen http://www.jonathanyuen.com.
Posted in Technology, Flex, Flash | 1 Comment »