Blog

  • Flex: D&D Tools v3 Source Files

    I re-did my D&D v2 components, which were made using Flash MX 2004 and Flashcom, in Flex with a bunch of additions. Really, I wanted to see how hard it would be to do the stuff I like to do in Flash in FlexBuilder, mainly, not-so-vanilla forms and drag-n-drop. This mini-project garnered much respect for FlexBuilder from me. I’ve tested the code locally, and what I’ve distributed does compile and should install into Central using an installer badge.

    If your looking for sample code in Flex pertaining to:
    – drag and drop
    – Central integration
    – Flashcom
    – using the Tile List component

    Then you may garner some use out of it. As always, some of the code I love, some I hate, and some doesn’t work where noted. I’ve written docs to get your started in your browsing, and documented the classes themselves, but not the methods or properties.

    Hope someone benefits from this!

    D&D Tools v3

  • Preparations for MXDU 2005

    Settling into the room here @ Star City Hotel, and quickly feeling guitly utilizing the shiny ethernet cable after reading Kai’s ability to utilize bandwidth for free vs. my 10 billion dollars per bit. We left our wireless card at home back in the states.

    I speak tomorrow morning, so “finishing” up my work for it. Much rather be drinking, playing XBox, and enjoying the awesome weather instead of working & doing homework.

    I’m on the 7th floor (723), my AIM is CentralXL, and her majesty and I will be at Star City for at least 4 nights; hopefully we’ll see you around and at the banquet tonight! If you shout out at the pool on the 5th floor (6th?) I’ll hear you.

  • MediaDisplay’s onUnload of Doom

    The MediaDisplay component has an onUnload event to ensure the FLV or MP3 it’s playing is closed before the component goes away. If you, however, attempt to create a movie clip/component with the same name in the same frame (or maybe it’s depth), it won’t work. You must wait a frame because the onUnload keeps a reference to the clip and stays around until the next frame. This caused havoc in a speech preso I was doing for school. I implemented a quick and dirty doLater to ensure I had no issues.

    function doLater(obj, meth:Function):Void
    {
            if(post_mc == null)
            {
                    createEmptyMovieClip("post_mc", getNextHighestDepth());
            }
            var d:Number = post_mc.getNextHighestDepth();
            var ref_mc:MovieClip = post_mc.createEmptyMovieClip("d" + d, d);
            ref_mc.obj = obj;
            ref_mc.meth = meth;
            ref_mc.onEnterFrame = function()
            {
                    trace("ref_mc calling");
                    this.meth.call(this.obj);
                    this.removeMovieClip();
            };
    }