Flex/Flash/Actionscript

My 360Flex slides and code

Here are the slides from my presentation at 360|Flex, as well as most of the code I presented. The presentation is embedded below using SlideRocket, or you can view it at the standalone link here.


That presentation is almost the same as the one I actually went with in the session (minus a few unimportant last minute edits). The hard part about doing a session that jumps between the slides and code in Eclipse is I don’t have any of the code we went over in the presentation. So here are a few of the examples that I covered, with source code.

Resizable Wrapper component
Demo | Source Code
This is a container component that adds resize handles and a drag bar that allows you to resize it’s contents and drag it around. Pretty straightforward, not too exciting. You would use the component like any other container and wrap it around the object you wanted to resize. So something like:



      


Adding resize handles to every UIComponent
Demo | Source Code
Now this is where we get into the cool stuff. In my talk I explained “underriding” core framework classes (I guess it’s actually called monkey patching, thanks to Tony Hillerson for teaching me this). I first learned about this technique on Michael Labriola’s blog. In this example I use the resize/drag component that I made and apply it at the base mx.core.UIComponent level. This means that every single framework class that extends UIComponent (every ui component in the Flex SDK) will have the ability to use the resize handles. No need for an extra wrapper container, or an extended ResizableImage or anything like that. It just works. Isn’t that cool?

Templating example
Demo | Source Code
I didn’t even get to this in my presentation, I ran out of time and skipped it. I’ll probably do a longer blog post about it in the next few days, but for now here’s an example with code for MXML templating. The basic idea is that I created a base “media player” class that included a progress bar to indicate the playhead time and a play/stop button. Then I used that class as the “template” and extended it to play a wav file and display the filename. Then I extended that to play an mp3 and display the id3 info in the component. And the last extension plays a video and displays the playing video in the component contents.

Thanks to smart people
A HUGE thank you goes out to all the awesomely smart people in my session that ran the thing for me. I’m going to write up a more detailed post with my thoughts on how the session went later, but I want to give a big thank you to Deepa Subramanian (for just being overall badass and answering a ton of questions), Andy McIntosh (for rocking the commitProperties discussion), Tony Hillerson (for monkey patching his way into the session), Adam Flater (for teaching me about [Mixin]), and David Coletta (for sharing his experiences with custom components while working on Buzzword). The session was fun because I got to sit back and let these guys teach everyone how to do custom component development.

Related:

  • A while back Ben Clinkinbeard asked a question on flexcoders saying "Am I the only one who wishes EventDispatcher exposed its listeners?" The fundamental issue was that he wanted to get a list of all the event listeners that had been added to a given component. The approach: using FlexSprite…
    Tags: component, class, monkey, uicomponent, source, code, example, flex, patching
  • I've been reflecting on how my session at 360|Flex went. Overall I was very happy, I really enjoyed the communal vibe we got going with the discussions. The session ended up being a conversation among developers. I started out giving a presentation with slides and all that jazz, but that…
    Tags: session, custom, flex
  • Since the next 360|Flex is fast approaching, I thought I'd post the full recording of my session at the last 360|Flex in Seattle. You can do whatever you want with this video, embed it wherever, watch it wherever, you can even download the original mp4 video file. Hopefully the embedded…
    Tags: flex, video, people, session
Standard

16 thoughts on “My 360Flex slides and code

  1. Dude, your talk was one of the best at 360. I think a lot of stuff got covered because you opened it up. It was more fun that way too.

    A note on Monkey Patch: http://en.wikipedia.org/wiki/Monkey_patch. It’s not *exactly* what you’re doing, but it pretty much does the same thing.

    We don’t have a fully dynamic language to work with, but what you’re talking about (overriding the framework) couldn’t be done in Java because of classloading protection.

    Anyhow, however you call it, underriding, monkey patching, whatever, it’s teh good timez.

  2. Thanks Doug… I agree, your talk was really well done. Not only did you spend a lot of time collecting and presenting really important stuff about Flex, you also got everyone involved in the audience that had something relevant to say.

    Make sure you let me know when you’re talking next.
    -adam

    ———
    http://adamflater.blogspot.com

  3. Hey cool!

    Just FYI, that’s the first ever embedded SlideRocket presentation anywhere. Nice to see it pretty much works other than some funky text rewrapping and effects scaling!

    Next time you should be able to present offline with AIR instead of worrying about crappy conference connectivity…

  4. Definitely the best talk I saw and the audience participation was a very cool twist. So much so that I would love to see a double length session at the next U.S. 360Flex (can’t swing Milan) and just run it under the assumption there will be enough discussion to carry it.

  5. Yeah, it’s true that the podiums all had hardwired connections. I actually didn’t know this prior (I’m sure it was published or discussed, I just missed it), so I assumed I was going to be on wifi and therefore chose to use Keynote instead of SlideRocket. As it turned out it would have been fine with the wired connection. I guess next time I should be prepared and know my setup before presenting. It’s hard when you’re drunk the whole conference.

  6. Hey Doug. I really enjoyed your talk as well. The weirdest part was wrapping my head around the fact that you sound like Tom Hanks. I closed my eyes and kept hearing Woody from Toy Story (well, maybe if Woody had Tourette’s syndrome).

  7. Paul D'Oyley says:

    Doug,
    I got the most out of your presentation last week; and I enjoyed meeting you afterwards. Interaction, open opinions, and the fact people can actually admit that they don’t know it all makes a good talk exceptional.

    Thank you.

    PS Um supersecreturl.. hehe, sorry I was abusing it… But my family enjoyed it while it lasted…

  8. Pingback: ????? » Blog Archive » [??]??!Flex??????

  9. Pingback: jonnymac blog » 360Flex / Day 3 / Sessions

  10. Pingback: Chui’s counterpoint » Blog Archive » Resize Handles For Flex Applications

  11. hi! doug, I think if the “ResizerAndDragBar” can hide itself initially then show while mouse is near the border of the component, it would be perfect!

    great works, Doug!

  12. Doug,

    I found your cool code on Tour de Flex and copied it to the SRC folder and got compile errors using Flex Builder 3. How do I compile it correctly. Any help would be appreciated.

  13. Patrick Whittingham says:

    Doug,

    Which SDK version do you use? I tried 2.0.3 hotfix 3, 3.0 and 3.2 with no success. 2.0.3 gave me the least errors.

    Pat

Comments are closed.