Flex

flex, mac, external browser

Ted Patrick has been quite prolific of late at publishing little productivity hints and tips. I think this one from a couple of weeks ago is worth echoing and noting the workaround for the problem it raises on a Mac.

We are setting up Builder to launch the help pages into an external browser. The key advantage of which being that the code samples can then be copy/pasted. On a Mac there is a recognised bug in eclipse that if you choose Firefox as the external browser, and it is NOT your normal system default browser. Basically Eclipse attempts to launch a second instance of Firefox which will generate the “Only one copy of Firefox can be open at a time” dialogue…

Firefox close dialogue

So to get around this, you have two options.

Option 1, if you have Firefox as your default browser for the entire system, simply choose “Default system Web browser” in the Eclipse preferences panel.

Option 2, if you want to keep something else set as your system default browser e.g. Safari, but would use Firefox for displaying Flex Builder help, you need to either edit or create a new external browser entry using a command structure as per comment 5 on the eclipse bug sheet. Essentially the following settings work…

  • Location: /usr/bin/open
  • Parameters: -a firefox %URL%

Flex Builder > General > Web Browser >Edit external browser

Posted by creacog in Bug, Eclipse, Flex, Flex 2, Flex 3, Mac OS, 1 comment

flash, flex and vice versa

I have a small AS3 project where I need to keep the SWF quite small. I really want to use the Flex Builder environment to do the coding, and ultimately produce a target or targets suitable for inclusion both in Flash and/or Flex projects.

Two very helpful posts of the last couple of days with respect to setting up a suitable environment:

Posted by creacog in Adobe, CS3, Flash Platform, Flex 2, Flex 3, 1 comment

essential actionscript 3 published today?

I don’t have my hands on it yet. I do have it on pre-order. Although at time of writing, Amazon is still showing it as ‘not yet published’, today is the official publish date. If it’s predecessors are anything to go by, this really will be the one book any ActionScript programmer should always have to hand. For more information and samples, check the author’s blog.

Update: Must be in high demand! Going to have to wait until at least 11th July 2007 for my copy.

Update (14 July 2007): my new “Estimated arrival date: 25/07/07 – 30/07/07” from Amazon.

Posted by creacog in ActionScript, Adobe, CS3, Flash Platform, Flex, Flex 2, Flex 3, 0 comments

tile or repeat an image into a flex application background II

Back in November 2006, I made a step-by-step post of how to locate, copy and adapt the ApplicationBackground class from the Flex SDK, in order to tile an image across that background.

This is simply an update to that post, this time with source-code and the addition a sample of a tile image within a Canvas. You are free to take and re-use this code as you see fit.

The following examples use a programmatic skin approach, and rely on the image being embedded at compile time. This is a quick and dirty method. For more information on programmatic skins, please refer to Aral Balkin’s Quick-Start on the Adobe site.

You can get your hands on the source with a right-click (control-click on a Mac) on the following examples.

Application tile background

In this sample we have created our own ApplicationBackground class and and applied it within the Application tag. You can change the repeat policy by uncommenting the appropriate line within uk.co.creacog.skins.ApplicationBackground . Choose this link if you wish to view example 1 in a new window.

You need JavaScript and Flash plug-in 9 to view this sample.

Canvas tile background

The key thing to be aware of is that the component background is actually controled by the a decorator class primarily designed to control the component border. So in this example we are applying our uk.co.creacog.skins.CanvasBackground to the borderSkin of the Canvas component. I added a slider to control the corner radius to demonstrate that we can have both rounded corners and a tile background. Note: that the borderStyle of the the Canvas need to be set to “solid” in order for the borderSkin to be invoked. In addition the onus is upon us as the programmer of the skin to respond to the cornerRadius values. In this case by calling drawRoundRectComplex.

Should we need a drop-shadow, again the onus is upon us to implement it within our custom skin. I did not take the example that far. The information you need to do so is in Aral’s article.

Again, choose this link if you wish to view example 2 in a new window.

You need JavaScript and Flash plug-in 9 to view this sample.

Other ways

Other authors have documented approaches with variations which might suit you better. You may find the following useful…

If you know of better ways, please do add links to the comments.

I haven’t got my hands on the Flex 3 beta yet. I have my finger’s crossed that these approaches might become obsolete with the new framework?

Posted by creacog in ActionScript, Adobe, Flex, Flex 2, 7 comments

good stuff coming in the form of Flex 3

It was pretty good to see some of the new stuff coming in Flex 3 during the developer day this week at Adobe Live London. We were a tough audience and didn’t give much of a WOW feedback – sorry! Largely I think because much of the new stuff demonstrated I think we might have claimed a right to expect – such as re-factoring support and improved work-flow with the rest of CS3.

Not covered on the day, but would have got a WOW from me is ‘Framework caching’, described by Ted on Flex today.

To me this was not expected, however I tend to think it has been a long-time coming and is one of the most significant improvements within Flash Platform in a long time. I came to Flash very late (MX2004) and primarily worked with components. (I came to Flex even later – V2.) It always struck me as a little odd that Adobe/Macromedia placed such great emphasis on keeping the plugin download small which then had the knock-on of vast quatities of band-width wasted as the same component code is transmitted time after time and where you least desire it -hitting the load time of your SWF. However now being able to cache the framework now means only the code specific to the application need be transmitted. Much more net-friendly. I can’t wait!

Posted by creacog in ActionScript, Adobe, Flex, Flex 3, 0 comments

worth a view…

Video of Christian Cantrell demonstrating an Amazon S3 (which I didn’t know existed) library and client application in Apollo using the soon to exist Apollo Beta.

Not sure what he’s been drinking (cup of pink stuff) but even with the empties, his desk is far tidier than mine.

Posted by creacog in Apollo, Flex, 0 comments

are adobe ripping off UK cusotmers?

If you read my earlier post, you’ll know I tend to think they are.

The software is great. I am happy to pay for it. I just don’t see why I should pay so much more for being British. My opinion of the reasons given: “Non Sequitur”.

El-reg are now highlighting this with respect to CS 3.

It’s just not cricket! 🙁

A question for Steve Burnard on the 17th I think.

Update (09/04/2007):

Update (19/04/2007):

Aral Balkan recently wrote an article around this subject. It and its comments are worth a read. I’m hoping that Adobe will listen and act, rather than trot out a stream of excuses.

Posted by creacog in Adobe, Flash Platform, Flex, 1 comment

i finally hot-fixed flex builder

The hotfix was published a few weeks ago. I had been suffering the debug problem on the Mac (193086), so it was time to apply the fix. (NOTE: Unless you are suffering any of the problems listed you are adivsed not to bother applying this fix)

I found the instructions more confusing than they needed to be. They essentially boil down to ‘make a backup copy of your current installation prior to applying the fix’. This is kind of vital, because if you do a straight replacement of the old “Flex SDK 2” folder with the fixed version, and you happen to use charting, you’ll find that the charts.swc is missing!

Also you need to be aware that first time you run the application after the fix, you will need to re-enter your serial numbers.

Posted by creacog in Flex, Mac OS, 0 comments