Month: January 2005

  • Flex Chronicles #5: Alert Drama

    There’s a known issue with Alert’s in Flex, using the application level alert, or Alert.show. When you do:

    function initApp()
    {
            ref = Alert.show("test",
                  "",
                  Alert.OK,
                  this,
                  Delegate.create(this, onAlertClose),
                  null,
                  Alert.OK);
    }
    
    function onAlertClose()
    {
            ref.deletePopUp();
    }

    The Alert’s background will stay around. In my investigations, he’s an mc in a very low negative depth. Removing him forcely messed up my app. Matt Chotin then recommended using a doLater. Upon doing so, it fixed my problem. I guess the invalidation routines co-chillin’ deep in the depths of UIObject remove the rect. ::shrugs::

    At any rate, if you do this instead:

    function onAlertClose()
    {
            doLater(this, "killPopup");
    }
    
    function killPopup()
    {
            ref.deletePopUp();
    }
    

    It works good.

    Took me 3 days to work through that mess; here’s to you not having to do so.

  • Flex, Flashcom, & Central: Tic Tac Toe

    Let’s start this new year off with a bang.

    Bloody hell, what a week. While the rest of you were probably spending quality family time with relatives & relaxing, I was doing the same, except I wasn’t relaxing. I made a Tic Tac Toe game with the all the free time/days off I could using Flex, Flashcom, and Central. I learned a lot, and have the classic “I hate how I did this, I must redo it knowing what I know now because I at the time, I didn’t know what I know now.” I coded myself into a corner on the Flashcom side, and couldn’t allow connection instances; meaning, all users share the same NetConnection instance; you all play the same game of tic tac toe, and have to share. You CAN chat, however, while waiting. She’s buggy and sort of works, but I fixed all of the horrible crashes… that I couldn’t find anyway. I plan on re-doing the core architecture in the future so you can play more than 1 game; I like how the UI fits, I like the Flex code, I like the Central code, I just don’t like the Flashcom code, both client and server.

    I only have 10 connections, so if you can’t connect, try again later.

    Have at thee!

    Tic Tac Toe – Install | Source