Auto Flash Class Panel

Posted 9 December 2010 by

Auto Flash Class PanelWatch the video below and if you’d would like to get the panel please visit the Auto Flash Class Panel page on ActiveDen’s new JSFL category. Your support is greatly appreciated!

What does it do?

Class and package names are generated form your library folder structure. With one simple click your library is ready for export. Saves you the effort of right clicking on the library item going to properties, ticking the ‘export’ checkbox and typing in the package/class name.

Version 2 is packed with a rich interface split into two sections, namely: Selector and Classer. The Selector section automatically selects all the library items that match your criteria. Choose from MovieClips, Bitmaps, Sounds, Fonts or Buttons. Once you are happy with your selection of library items, you simply use the Classer section to automatically insert class, base class and tick the ‘export’ checkbox.

The Auto Flash Class Panel is also fully customizable, click the settings button and customize how you want the panel to work and function.

Video Walk-Through

Remember to bump up the quality to 720p!

Credits

This panel is built with Robotlegs, AS3Signals, MinimalComps and FDT4.

Post Details

  • Pingback: Auto Flash Class Panel by Matan Uberstein | Beautify Code Blog

  • Pingback: Tweets that mention Auto Flash Class Panel | Matan Uberstein | AS3 Blog -- Topsy.com

  • Brendan

    Genius :) ! However I don’t like to tie my classes to external ones. Stick to generic base classes to gain the most reuse and re-purposing of a library symbol. I also use eg: assets.MyMovieClip instead of MyMovieClipFC. Dood mad job on this extension!!!!

    • http://doesflash.com Matan Uberstein

      Thanks!!! :D Hope you enjoy using it!

  • http://Www.Robbieboyd.co.nz Robbie

    Too cool!

  • michael

    Mate, this looks really cool. Like Brendan I like to keep my bitmaps generic rather than make a unique class, is that possible? I’m looking forward to having a play with this :grin:

    • http://doesflash.com Matan Uberstein

      Hi, I was just making an example with the extended bitmap, just to show everyone what can be done with the panel. :) The default setting will do what you want. You’ll notice if you manually insert (not using panel) a class name for a bitmap (or any of the other symbol types), flash will automatically insert a base class. Those base classes match with the default base classes of the panel. 80% of people using the panel will just press the “Class!” button, but the versatility is there if you need it.

  • Gerald Yeo

    Great tool! Thanks for doing it.

  • Pavel

    And so conversation starts)

    My main question regarding fla-swc-mxmlc workflow is: why do extend ur code-classes from graphics(***FC) ones? I always do other way: graphic asset extends the base code one.

    You can have many visually different (I would say specific) ones that behave same way. Think of any design-focused thing, where designer has to draw and position (scale, rotate, apply filters, etc) a lot of things as he see it, and u have to kinda inject code in it. For many object in many depths of nesting. With ur approach u would have to either create and position all of them manually, or create some tricky utilities like creating and adding items according to pointers and so on…

    Tell me what do u think. //And sorry for english)

    • http://doesflash.com Matan Uberstein

      Yip, and so it begins. Thanks for the question. :)

      There are a few rules that I follow regarding compiling assets from Flash. Firstly, never compile code into my assets. Secondly, by compiling assets with their default base classes still have all base functionality you need. Thirdly, all functionality must be handled via your “proper” coding IDE, thus re-iterating the first point. 4th, assets compiled by flash are “dumb” assets, meaning that the only keep visual aspects like positioning, filters and children.

      In this video, I only showed extending the asset, because that’s not the focus of the panel. The panel is merely a tool to set packages, class names and base classes to your assets. What you do with your compiled assets in your coding IDE is up to you. Be it, extending, wrapping, embedding or just using it directly.

      This panel will work for any type of work-flow, as the problem of manually inserting these mundane properties to your library items, are common.

      The above is merely my opinion/work-flow with Flash, so I’m NOT preaching to you like some kind of religion ;) hehehe

      When it comes to different visual assets that need the same functionality, I extend and implement interfaces. Maybe even write and abstract class that handles the base functionality. In a case like this with an abstract class, you won’t always extend an asset, but “inject” the asset into the abstract. So in short, create abstract, create class that extends abstract and implements interface, but constructs and uses the asset (FC).

      All-right, that was a mouth full. ;)

      • Pavel

        1st,2nd and 3rd is OK when u do the trick:
        fla:
        symbol MyListItem — some item rendere for ur list. if properties u define assets.MyListItemAsset (or any package, but I use Asset as postfix and so many developers do). Next is the trick: u set base class to, lets say, components.renderers.MyListItem
        and u create an empty dummy class (just extending MovieClip). Structure looks like:

        +src
        –+components
        ..–+renderers
        ….–MyListItem.as #real one
        +libs
        –+fla
        ..–+components
        ….–+renderers
        ……–MyListItem.as #dummy one
        ..–assets.fla
        ..–assets.swc
        –somelib.swc

        You compile assets.swc once, then work with the real code class in your favourite IDE. And when compile the project dummy classes are replaced by the real ones. Code is kinda injected into ur symbols are their nested symbols (if u have so) and so on.. Like if u develop in Flash CS IDE and define base classes.

        The workflow trick is to add classpath to fla “../../src” (so that it will find some class when u define it in the base class field) and then generate those dummies (with jsfl of course) so that swc from fla won’t have any real code inside (so that even designer could work with it).

        The only thing is that assets are not that dummies in result this way, but that’s exactly what I want from them.
        Isn’t it more natural and convenient?

        • http://doesflash.com Matan Uberstein

          Your work-flow works perfectly; this is what I love about flash. :) Always lots diversity and everyone should find the best way that works in their environment. I use to work exactly like you, creating useful base classes for my visual assets, but the last 2 years or so, I tented away from it. After having many in depth conversations with brilliant minds, I came to where I am right now. At the moment, I’m a one man Flash department with an excellent design team, which supply me with psd/ai files.

          Tell me, do you have some kind of “base movie clip” class you always start off with?

          PS: Thanks for comments and questions! :mrgreen:

  • Pingback: Matan Uberstein´s Auto Flash Class Panel | .swfgeek

  • Pingback: FDT» Blog Archive » Good Finds This Week

  • http://nicob.info/blog NicoB

    Hi Matan,

    Your panel seems really great! Congratulations. It should have been a hard work.

    I’ve got a small question which concern your tool indirectly :

    I’ve got my own framework with an Abstract Class AMovieClip (that extends MovieClip).

    In my fla, I make a ContentFC MovieClip (linked to a class me.ContentFC and with baseclass AMovieClip).

    If I put a subclip in the ContentFC and I call it “mc”, the property “mc : MovieClip” isn’t inserted in the ContentFC but in the AMovieClip Class.

    ex:

    Inheritance:
    MovieClip <- AMovieClip <- AContentFC

    What I do in flash
    MovieClip <- AMovieClip <- AContentFC
    |
    mc

    What I've got in my swc
    MovieClip <- AMovieClip <- AContentFC
    |
    mc

    At compilation via flexsdk, it doesn't seem to be an issue, but FDT returns me a lot of errors and I don't have autocompletion anymore on these classes.

    Do you already had this kind of problem, and have you got a work-around?

    BTW I'm using flash CS4 (but I've got the same thing with CS5) and FDT 4.

    Thanks for your answer!

    • http://doesflash.com Matan Uberstein

      Hi NicoB,

      I’ve tested this out now, it’s really weird, but it does happen. When Flash generates the class it adds the public accessors (this instance’s children) to the base class. You can avoid this by creating a class for your AContentFC extending AMovieClip, also, clear the base path value of the symbol properties. You now see that child properties of AContentFC does not get compiled into AMovieClip.

      Thanks for bring this to my attention, v3 of the panel will take this into consideration.

      Hope that helps!

  • http://nicob.info/blog NicoB

    Thanks Matan!

    You can also turn off the option “Automatically Declare Stage Instances”, but you have to redeclare the movieclip content in the class ContentFC.

    I think with this solution or with yours we lose the simplicity brought by the swc.

    It seems weird that the properties are included in the Abstract Class.
    I don’t know if it is an issue from Flash when generating the swc or FDT while reading the SWC.