Ramblings

December 7, 2009

Flex… um… without Flex?

Filed under: as3, cool, flex, mxml — michaelangela @ 12:56 pm

I had just mentioned compiling MXML without using FlexBuilder and did a quick Google on it to see the current state of such integration. Wow this is pretty cool. 😛 Some neat info and projects in the comments as well including FLit.

Using MXML without Flex (Example and Source) | Ryan Campbell

I made a few minor changes to the MinimalComps project from Keith Peters and got it playing nicely with MXML. The below application compiles to a tiny 23KB yet makes use of MXML and even data binding.

December 2, 2009

BDD and Flex

Filed under: behavior driven development, flex, tool — michaelangela @ 9:16 am

I’ll post them as I find them. I know there is a commercial system similar to this called RIATest. But this should suffice for a lot of basic cases.

Gorilla Logic | Our Stuff | FlexMonkey

FlexMonkey is an Adobe AIR application used for testing Flex- and AIR-based applications. Providing the functionality to record, playback and verify Flex UI interactions, FlexMonkey also generates ActionScript-based testing scripts that you can easily include within a continuous integration environment.

November 24, 2009

FunFX Tutorial

Filed under: cool, dev, flex, functional testing, tool — michaelangela @ 2:30 pm

Just for future reference… this is some nice stuff indeed!

Testing your Flex app with new FunFX | Ladislav Martincik – Personal website

Flex Functional Testing

Filed under: dev, flex, functional testing, tool — michaelangela @ 2:28 pm

See the syntax example on the page for a quick reference. Wow…  that’s pretty cool.

.::FunFX – Functional Testing of Flex applications

FunFX is created as a framework that will enable you to drive a Flex application through a web browser. FunFX together with for instance Test::Unit or rSpec creates a great to for testing and asserting the functionality of a Flex application.

September 2, 2009

Desktop Regexr

Filed under: ask, flex, regex, tool — michaelangela @ 6:03 am

And here’s the info on the desktop version:

gskinner.com: gBlog: RegExr Desktop Released: Regular Expression Tool in AIR

I just uploaded the desktop version of RegExr. It’s just an AIR version of the online application for now, but I’ll add some desktop specific features, and put up a nicer looking page when I have a chance.

With this morning’s announcement of the AIR alpha for Linux, this means RegExr is now the first free tool for editing and testing regular expressions (RegEx) that runs on Mac OSX, Windows, Linux, and online (as far as I can determine). Pretty cool, considering it only took 60 minutes of work to convert the online application to a desktop program and add update notifications.

You can install the desktop version of RegExr here. Or, you can use the online version at regexr.com.

Update: This recently helped me convert some text from an select options dropdown list to text for a dataprovider to use within AS3. Nice! I usually use TextWrangler for stuff like this but Regex helps you iteratively see your progress as you match and replace data. Thank you Mr. Skinner!

Should I check it or not! Uncheck it, and leave a note

Filed under: as3, flash, flex, tip — michaelangela @ 12:12 am

Since this is being developed for others, the final concensus is to uncheck it and leave a README.txt that explicitly says so. 🙂

Accessing named MovieClips placed on the stage in Flash CS3 while staying true to OOP best-practices « dispatchEvent()™

I happen to agree with Sarah that the best way to work is to uncheck the checkbox and declare all of your variables yourself. This is the only way that really enforces good practices when you are using classes behind your MovieClips in the library.

September 1, 2009

More on strongly typed references to timeline instances

Filed under: as3, cool, flash, flex, tip — michaelangela @ 11:58 pm

And this states the issue well in a short sentence. Developing for Flash outside of the Flash IDE breaks into two camps if the “Automatically Declare Stage Instances” is checked or not. The solution mentioned below is another way (closer to the way I do) to get a reference not only as a movie clip but as a specific class object. That’s helpful when you’re adding linkages to your symbols with external classes.

Re: [Flashcoders] Automatically Declare Stage Instances andinheritance.

I think unchecking that box is the best way to handle this, but the other options presented are useful for working around these issues. My main worry seems to be incompatibilities with people who may write code using the box checked, which it is by default. It seems that this checkbox forks all AS3 code into two exclusive camps. I hope I make the right choice. 😦 C

On Mon, May 12, 2008 at 3:58 AM, Cor <[EMAIL PROTECTED]> wrote:
> This will do the trick:
>
> private var okButton:SimpleButton = getChildByName(‘okButton’) as SimpleButton;

Getting strongly typed objects from flash cs3

Filed under: as3, cool, flash, flex, tip — michaelangela @ 11:53 pm

I have done this for AS2 using Flash Develop, and something similar to it using PureMVC for a Flash CS3 project developed within FlexBuilder, but it’s nice to see it “approved” of sorts. The issue? How do you access objects on the timeline in a strongly-typed manner. The blog post itself describes the situation well and this solution handles it well enough for me. The good thing is with this solution is that the movie clip name can of course change in the FLA and you only have this to update to keep it in sync.

Flex and Flash Developer – Jesse Warden dot Kizz-ohm » Blog Archive » Designer vs. Developer: Declaring Stage Instances

I think I’ve seen this approach in the Essential ActionScript 3 book and I’ve used it.

1. Leave the option turned on, so the Flash IDE will generate all the properties.
2. For every thing I need to refer and use code hinting I would do the following:

private function get scroller { return this[“mcScroller”]; }

or something like this.

Another note on debugging Flash with Flex

Filed under: flash, flex, tip, tool — michaelangela @ 9:40 pm

Neato. Just making notes but it’s good to see. 🙂

BUT REMEMBER TO SET “Permit debugging”. Drove me crazy for a while until I saw I hadn’t… 😛

Big Bad Code » Blog Archive » Using Flexbuilder to edit and debug Flash Applications

Now you have the full power of Flexbuilder to code and debug and you still have the Flash IDE to layout movieclips and rapidly prototype things. Sweet.

Flash Builder 4 debugger is going to be even nicer?!

Filed under: cool, flash, flex, tool — michaelangela @ 9:38 pm

But we do have to wait until Flash Builder 4 is released. It’s in beta now but… well when I get some time…

mikemo » New Flex Builder debugger features: Conditional breakpoints, function calls from expressions, watchpoints, and more

I wanted to tell you all about some of the exciting debugger features we’ve been working on, which will be in Flex Builder 4, including several of the most common requests. All of the features listed below are in the preview release of Flex Builder that we gave out at MAX, with the, um, exception of exception breakpoints, which are not yet in the product. If you were at MAX, give these features a try, and let us know your feedback! If you weren’t able to make it to MAX, don’t worry, this stuff will eventually show up in a beta on Adobe Labs, and then of course in the final product as well.

Debug Flash CS3 with Flex Builder

Filed under: as3, flash, flex, tip, tool — michaelangela @ 9:36 pm

Lots of info on using Flex Builder to edit, but not so much on debugging. Just taking some notes.

Using FlexBuilder 3 to debug & edit Flash CS3 projects « The Morphic Group

Recently I was working on a project that due to a requirement had to be compiled in Flash CS3. Having spent the last few years exclusively using FlexBuilder I was shocked at the HORRIBLE AS3 editor and debugger in Flash CS3. I quickly tried to figure out how to edit and debug from FlexBuilder 3. I got some help along the way, and wanted to share the process.

August 21, 2009

Flex setter not executing when using binding

Filed under: as3, debugging, flex, tip, workaround — michaelangela @ 5:30 am

Good to know. And it does make sense as described in the comments. This is for my future reference and for others who may experience it.

In a nutshell, if you have a getter/setter pair and make them [Bindable], the setter will not execute again if the new incoming value is the same as the current value. That speeds up performance but if you always need to check that value, it might be a bit confusing why it’s not executing.

nwebb » One Reason Why Your Flex Getter May Not Execute

Cause
As soon as you make the getter/setter bindable, Flex stops running the setter whenever the value you’re sending in already matches the value that the corresponding getter will return.

Solution
The solution (or at least one solution) is not to rely upon the default propertyChange event which is dispatched for bindable values, and instead create/dispatch a custom event

Generated getters and setters in Flex

Filed under: as3, automation, cool, eclipse, flex, tool — michaelangela @ 1:11 am

So for this particular Flash AS3 project I am doing that uses Flex as the code editor, I was just about to write a getter/setter pair and thought “perhaps someone has made a way to automate this…”

Quick Google later…

No More Writing Getters and Setters in Flex

eokyere blog has one of the best Flex productivity tips I have seen in quite a while. I build AS3 components all day, and spend way too much time manually typing getter and setter methods. Using the Dash plugin for Eclipse and eokyere’s productivity with with dash in eclipse, you’ll never write another getter and setter again!

Flex, SWFObject, history and deeplinking

Filed under: as3, deep-linking, flex, tip, tool — michaelangela @ 12:51 am

A nice template for Flex for incorporating SWFObject, history, and deep linking.

Just Flex: Swfobject 2.1 Flex template. HistoryManager and DeepLinking supported as well

I have been using Geoff Stearns’ SWFObject for a long time. I think it will be useful to share my index.template.html that tuned for using with SWFObject 2 2.1. I was inspired with Ted Patrick’s FXWidget project that uses SWFObject 1.5 for embedding flex content to html page. So now it supports HistoryManager and DeepLinking.

September 25, 2008

I simple have to check this out

Filed under: cool, dev, flex — michaelangela @ 10:49 pm

openflux – Google Code

OpenFlux is an open-source component framework for Flex which makes radically custom component development fast and easy.

July 14, 2008

Custom Flex Calendar controls

Filed under: as3, cool, dev, flex — michaelangela @ 3:17 am

I have worked with customizing the Flex calendar components and will probably need to do so again in the future, but this is pretty neat. I’ll have to look into this more soon.

Refreshingly new Flex Calendar controls « My journey in the world of RIA

Flex is a very flexible language and I’m here to prove it again.

Today, I’m posting these two new cute flex calendar controls which uses inbuilt “CalendarLayout” class for functionality and has a completely new layout and interface defined in MXML.

July 5, 2008

Animated Skins in Flex

Filed under: as3, flex, note — michaelangela @ 8:38 pm

Very neat. Very cool. You have to check it out if only to see dancing Gingerbread men in Flex… 😛

Tink » Blog Archive » Seamless Animated Skins in Flex

In Joey Lotts session on styling Flex at FOTB (where he did a great job), one of the attendees asked about animated skins.

There’s
obviously many ways to approach this but I thought I’d do an example of
how you can have seamless transitions between these states using frame
labels inside the symbol in Flash, and by adding code using
addFrameScript().

Flex SDK coding conventions and best practices

Filed under: flex, note — michaelangela @ 8:32 pm

Coding Conventions – Flex SDK – Confluence

This document lays out the coding standards for writing open-source Flex framework components in ActionScript 3. Adhering to these standards makes the source code look consistent, well-organized, and professional.

Some of these standards are completely arbitrary, since there is not always a “best way” to code. Nevertheless, in the interest of consistency, all commits to the Flex SDK project will be expected to follow these conventions.

Actionscript 3 Excel library

Filed under: as3, dev, flex, note — michaelangela @ 8:31 pm

Adobe – Flex Extension

An Actionscript 3 library for reading and writing Excel files. Currently reading numbers, text, and formulas from Excel version 2.0-2003 and writing numbers, text, and dates to Excel 2.0 is supported. No server-side help is needed.

June 30, 2008

How to add duration info to a FLV file with the flvtool2 command

Filed under: cool, flash, flex, flv, linux, one-liner, python, shell, tip, tool — michaelangela @ 1:37 am

Very useful. Sometimes some flv conversion tools don’t include info that is vital for playback. In this case, the seekbar wouldn’t show up in the player until after playback finished. I’ll be testing to see if this resolves it but either way, this is good to know. The first hint was this post stating that the duration metadata probably wasn’t present in the file. A quick test with flvtool2 showed that indeed there was NO metadata. Using the command shown here, the data was added. I might either wrap this up in a python wrapper to batch a directory with it, or just bite the bullet and learn more shell programming to loop through all matching files in a directory.

[edit] I guess looping in shell programming isn’t so bad:

ls -1 *.flv | while read file; do cat "$file" | flvtool2 -U stdin "$file" ; done

Add duration metadata into flv movie – Shell Script (Bash) – flv, movie, flash, duration, metadata, flvtool2

By default an flv movie doesn’t contain the duration metadata. Using the flvtool2 program it is injected like this into the movie file.

cat mymovie.flv | flvtool2 -U stdin mymovie.flv

June 15, 2008

Enums, Objects and the joys of being typesafe

Filed under: as2, as3, education, flex, tip — michaelangela @ 1:51 pm

I like autocomplete. I also like it when the compiler (or IDE) tells me I am doing something wrong BEFORE I compile. Flexbuilder is my AS3 compiler of choice. Although FlashDevelop 3 has come a really long way. It’s PC only though. 😦

Anyway, just did some reading about Enums in AS2. This bit of reading below came courtesy of a link here about creating typesafe enums in AS3. I really like this. I particularly like the idea of the “Month” class given in the comments on the page below. In addition to being typesafe, by attaching an ordinal to each value, you can compare your values. So in that case Month.JAN would be less than Month.MARCH. (There is also a discussion about “SCREAMING_CAPS” that was enlightening. I digress…)

blog-j: Symbolizing, Coding, Objectifying, Processing » Code. Code. Code.

I’m in the middle of reading Code Complete, Second Edition by Steve McConnell
(a book which I can’t recommend highly enough). One of the key points
of the book is that just because your language doesn’t natively support
a certain implementation ideal (for example, private field members or
classes), you should work around those limitations by ‘programming into the language, not in the language.’ One example he gives of this is Enumerated types.

The definition of an Enumerated type is this: “A list of named
values used as the range of a particular attribute type. For example,
Color = {Red, Green, Blue} (source).”

This can be useful in limiting possible values for a methods
arguments (and more). For example, by using an Enumeration of
SearchTypes, you can ensure that the searchType argument falls into the
valid values for a SearchType.

Enums, Objects and the joys of being typesafe

Filed under: as2, as3, education, flex, tip — michaelangela @ 5:16 am

I like autocomplete. I also like it when the compiler (or IDE) tells me I am doing something wrong BEFORE I compile. Flexbuilder is my AS3 compiler of choice. Although FlashDevelop 3 has come a really long way. It’s PC only though. 😦

Anyway, just did some reading about Enums in AS2. This bit of reading below came courtesy of a link here about creating typesafe enums in AS3. I really like this. I particularly like the idea of the “Month” class given in the comments on the page below. In addition to being typesafe, by attaching an ordinal to each value, you can compare your values. So in that case Month.JAN would be less than Month.MARCH. (There is also a discussion about “SCREAMING_CAPS” that was enlightening. I digress…)

blog-j: Symbolizing, Coding, Objectifying, Processing » Code. Code. Code.

I’m in the middle of reading Code Complete, Second Edition by Steve McConnell
(a book which I can’t recommend highly enough). One of the key points
of the book is that just because your language doesn’t natively support
a certain implementation ideal (for example, private field members or
classes), you should work around those limitations by ‘programming into the language, not in the language.’ One example he gives of this is Enumerated types.

The definition of an Enumerated type is this: “A list of named
values used as the range of a particular attribute type. For example,
Color = {Red, Green, Blue} (source).”

This can be useful in limiting possible values for a methods
arguments (and more). For example, by using an Enumeration of
SearchTypes, you can ensure that the searchType argument falls into the
valid values for a SearchType.

Pure AS3 preloader

Filed under: as3, dev, flash, flashdevelop, flex, tip — michaelangela @ 12:09 am

Well I wasn’t making a game but I just went through what the author describes: finishing up the app, gotta set up the preloader. I did a manual version of this but I like this idea. However I am not using FlashDevelop. 😦 I am in the Flash IDE for compiling. I have thought of being able to just embed assets from Flash CS3 into a Flexbuilder / Flashdevelop AS3 project. And it seems to be becoming a popular thing to do.

gamepoetry » The Last Preloader You’ll Ever Need

Zero Effort Preloading

Based on the fundamentals established in the bit-101 article, I have
provided an AbstractPreloader class. You must subclass this class in
order to create a meaningful preloader for your game. These are the
steps required to get your preloader working:

  1. Extend the provided AbstractPreloader class.

  2. Override the following protected functions: beginLoading,
    updateLoading( percent ), endLoading. If your Main class is not called
    “Main”, then override the mainClassName function too.

  3. Embed the preloader with a single line of code.

  4. Be mindful of gotchas.

That’s it, really.

List all symbols and their linkages in a Flash file

Filed under: as3, flash, flex, functional testing — michaelangela @ 12:02 am

I am just wondering out loud… is this possible? Is there a way to list all the symbols in a Flash file and the classes linkages defined for them? Ah, perhaps better still, if the symbols are the same name as the class they are to link to, scan all the symbols and scan all the classes in the project and see if they are all linked appropriately.

It’s not so bad though. If you miss the linkage, you get a runtime error. It would be nice to catch it earlier though.

I suppose with a custom Flash panel it would be possible though. Seeing what some do, like the very cool and have-not-yet-had-time-to-try-out Gaia framework, it looks like something like this would really be possible.

April 24, 2008

Google, Search, Flex

Filed under: api, dev, flex, google, search, tool, yahoo — michaelangela @ 10:05 pm

Oooooh sweet. According to this article, Yahoo’s search API is still more “developer friendly”. Either way, having them available is quite cool.

Google Search REST API

More than one year after Google discontinued the SOAP Search API, it finally got a proper replacement. The AJAX Search API can now be used from any Web application, not just in JavaScript. The other two Google AJAX APIs for feeds and translations were updated for non-AJAX use, as well.

“For
Flash developers, and those developers that have a need to access the
AJAX Search API from other Non-Javascript environments, the API exposes
a simple RESTful interface. In all cases, the method supported is GET
and the response format is a JSON encoded result set with embedded status codes.”

“Using
the APIs from your Flash or Server Side framework couldn’t be simpler.
If you know how to make an http request, and how to process a JSON
response, you are in business,” says Mark Lucovsky. Here’s a simple example for web search:
http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;q=Earth%20Day

Older Posts »

Blog at WordPress.com.