Blog

  • MovieClipLoader Oddity in Flash Lite 2

    Jeff from Custom Logic posted on the Flash Lite mailing list about a problem with MovieClipLoader. Basically, if you remove the MovieClip via removeMovieClip that is used in the load operation for the MovieClipLoader.loadClip, as soon as the image loads, you’ll get a “Unable To Load Data” error. For some reason this race condition is handled fine in Flash Player 9 and below, as well as the Flash Lite emulator in Flash 8, but not in Flash Lite 2.

    Solution is to encapsulate the load operation & removing of the MovieClip in a class that generates an event upon success since it cannot happen immediately.

    Non-class example (tested and works):

    function init()
    {
            mcl = new MovieClipLoader();
            mcl.addListener(this);
            
            load_btn.onPress = function()
            {
                    this._parent.doLoad();
            };
            
            kill_btn.onPress = function()
            {
                    this._parent.doKill();
            };
            
            // keep state
            abortFurtherLoading = false;
            isLoading = false;
            
            fscommand2("FullScreen", true);
            
    }
    function doLoad()
    {
            // only load if we aren't already doing so
            if(isLoading == false)
            {
                    isLoading = true;
                    if(image_mc) image_mc.removeMovieClip();
                    createEmptyMovieClip("image_mc", 0);
                    mcl.loadClip("http://www.some.com/image.jpg", image_mc)
            }
    }
    function onLoadInit(p_mc)
    {
            isLoading = false;
            // if we should abort, go ahead and remove
            // the clip
            if(abortFurtherLoading)
            {
                    abortFurtherLoading = false;
                    removeTheClip();
            }
    }
    function doKill()
    {
            // if we are loading...
            if(isLoading == true)
            {
                    // ...wait till we're done
                    abortFurtherLoading = true;
            }
            else
            {
                    // ...otherwise, kill immediately
                    removeTheClip();
            }
    }
    function removeTheClip()
    {
            image_mc.removeMovieClip();
            delete image_mc;
    }
    
    init();
    
    
    
  • Speaking About Flex 2 for FMUG.az

    I’m speaking about Flex 2 this evening to the folks at FMUG.az, and it will also be broadcast & recorded via Breeze. I’ll be doing an overview of the technologies, and show some my favorite features through some code examples I’ve built. Specifically, I’ll be covering:

    1. What Flex 2 is & why you should care
    2. Flash Player 9 (formerly known as 8.5)
    3. ActionScript 3
    4. Flex Builder 2, the new IDE & plugin for Eclipse 3.1
    5. Flex Framework 2
    6. Briefly touch on Mystic, the ColdFusion 7.0.1 updater
    7. Briefly touch on Blaze, beta name for Flash 9

    I have an immense amount of material to cover in 2 hours, so I welcome questions before (comment on this blog), during, and after the presentation. You should come away understanding what Flex 2 is, what technologies make up Flex 2, and how each part can benefit your Flash, Flex, server-side, and/or general Rich Internet Application work.

    It starts at 6:30pm Arizona time, 9:30pm eastern time (GMT -5), and you can get the Breeze link from here.

  • I Blogged Your Mom

    I was shopping at the mall for some new diggs, and while in Hot Topic purchasing the Charlie & The Chocolate Factory sunglasses, I spotted a shirt that said, “I Blogged Your Mom”. WTF?

    I can understand if I were 16 again, and I spotted my friend’s mom nekkid or something and I blogged the experience… but… there has to be some other meaning there. I know I’m over-analyzing it, but I can usually port reason to some of the insane, teenage angst shirts I see, just not this one.

    One really cool one was of the dog from Family Guy dressed up in a banana costume with maracas and it said It’s Peanut Butter Jelly Time. Not sure how Family Guy fits in, but hey, it’s a phat tune so who cares.

    Speaking of shirts, I got wasd, insert coin, and Hadouken v2 for my birthday.

  • JunkieXL @ my B-Day this Saturday

    Celebrating my 27th birthday this Saturday at Eleven50 with my favorite DJ, JunkieXL. Tickets are $15. Hope to see you there!

    JunkieXL via Liquified.