View Flex <mx:…/> tag classes

This is probably common knowledge for most but I’m posting it as it just came up in conversation (as I demonstrated it to a colleague). Also for the budding component developers amongst us this be of use and even prove insightful.

So, given the title this obviously has something to do with MXML tags. Which it does.

So what about them?
Well I’m refering to is the functionality that allows you to load and review the actual classes that are defined by the tags in Flex Builder 2.0.

To do this open up Flex Builder and create a new MXML file. The default code that is generated will do so you should see the following in your ‘source’ view.

Flex default 'Application' code

[Thanks for the update Rob]Now with your mouse pointer click at the beginning of the <mx:Application… this should highlight that entire row, as you can see in the image mine highlights in blue. Now hold down CTRL on Windows or CMD (The Apple key :p) on OS X and hover your mouse over the word Application. What should happen is that it will underline and allow you to click it.

When you click this new link the Actionscript 3.0 class for that tag will open in the IDE for you to look through. Apologies if I’m posting ‘money for old rope’ style information but it is so easily missed if you haven’t heard or seen it before…

For those that haven’t I hope it proves useful :)


11 comments for “View Flex <mx:…/> tag classes”

  1. You don’t have to select anything. Just hold the control button and click on whatever you want.

    Posted by Rob Taylor | March 9, 2007, 13:43
  2. Thanks for that Rob, I just always did it like that – that makes it even easier then :D

    Posted by FlashGen | March 9, 2007, 13:46
  3. You can also press F3, which also works with Java code. F3 is ‘Open Declaration’ so you can also select any variable in your code, press F3, and it will goto the declaration of that variable

    Posted by Collin | March 9, 2007, 16:52
  4. this is used for embedding html pages in flex right ?

    Posted by hitesh sethi | June 2, 2009, 10:10
  5. @hitesh No, this is a short cut to allow developers to view the underlying ActionScript code that is represented by MXML within a Flex application :)

    Posted by Mike Jones | June 3, 2009, 10:02
  6. what exactly is <mx:
    and y do we use that

    Posted by sweety | August 3, 2009, 19:12
  7. @sweety, the prefix is what is known as a namespace. You can read more about namespaces here: http://en.wikipedia.org/wiki/Namespaces

    Posted by Mike Jones | August 4, 2009, 10:35
  8. thanq sir..

    Posted by sweety | August 4, 2009, 14:27
  9. which book is gud for learning flex from basics

    Posted by sweety | August 4, 2009, 19:01
  10. @sweety

    Programming Flex 3 from O’Reilly is an excellent primer (http://oreilly.com/catalog/9780596516215/?CMP=AFC-ak_book&ATT=Programming+Flex+3%2c). Getting Started with Flex 3, (http://oreilly.com/catalog/9780596520649/?CMP=AFC-ak_book&ATT=Getting+Started+with+Flex+3%2c), is a pretty good pocket guide, and The Flex 3 Cookbook, (http://oreilly.com/catalog/9780596529857/?CMP=AFC-ak_book&ATT=Flex+3+Cookbook%2c), is handy for those who like cookbook style books :D

    Posted by Mike Jones | August 5, 2009, 16:33
  11. thanq sir

    Posted by sweety | August 11, 2009, 07:54

Post a comment