Blog

  • 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

  • Flex Chronicles 4: createClassObject, Floaters, & Caching

    As I remove the arrows from my back and lay back in a bed of salt, I continue to record my trials for your benefit. Cool program, but she still has her learning curve which hurts all the more if you just skim the docs (which they got right with this product) and dive right in like me.

    createClassObject

    I swear, createClassObject is more trouble than it’s worth in Flex components. Your better off just doing all the GUI + configuring the controls in Flex, and then just listen for events in code. I’m converting a plethora of Flash controls, and all the resizing within containers, etc. is all jacked… until I just lay everything out by hand, and pretty much remove my createChildren function. It’s cool, it’s just an extra step I wasn’t planning on doing, but at least I’m not reinventing the wheel, and the benefit is I get to delete my size functions since Flex handles that beautifully.

    *** Update: Ok, don’t use Window with PopUpManager. Instead, just define your classes as TitleWindow’s, and then load your class in PopUpManager. I can’t find a “contentPath” property equivalent in TitleWindow, but I’m tired, so fuggit.

    Dreamweaver Floaters

    Trying to create a Floater in Dreamweaver/FlexBuilder. Basically, Flash MX/MX 2004 has this SWF in the WindowsSWF folder you get when you install the Flashcom components. It is called the Communication App Inspector, and it allows you to load app instances, and reload them, and see statistics + trace information from your server side scripts for Flashcom.

    Dreamweaver/FlexBuilder don’t have a WindowSWF folder, and if you wrap the SWF in HTML and drop in a Commands folder, it becomes modal… not a nice panel. SO, I ended up copying the floater code from the sames in creating Dreamweaver extensions, and with some tweaking of the menus.xml file, I can now access the panel and dock it in FlexBuilder. It’s only enabled, though, on as/asc files… when I select an MXML file, regardless of mode (Code/Splite/Design/Run/Debug), it’s disabled. I followed the docs and set enabled to true in the menus.xml file, and put the isAvailable or whatever function to return true, but no dice. It’s all good; sometimes it screws up, and remains enabled so I can still debug my Flashcom apps. So far, so good.

    Caching

    BTW, if you get bit by the caching bug where you edit code but nothing changes, check this location at the LiveDocs.

  • I Qualified for a Non-Commercial, Non-Institutional Flex License

    Hell yeah! Just got my confirmation email, and the CD is in the mail. Nice present, Macromedia, thanks!

  • Dance Dance Revolution, The Other Cardio

    Who needs running when you got DDR? If your making those new years resolutions, and/or you have some holiday money at all, get this game with 2 mats for XBox. The Workout Mode even shows you how many calories your burning! If you danced to 10, 2 minute songs, you could burn off that Corona Lite (about 100 calories)!

    I wanted to get some more songs from XBox Live (yes Darron, I signed up), but they are $5 a pop for a CD that I can’t even preview. I’m gonna Google for some previews/reviews/possible mod workarounds, but anyone know if any of the downloadable volumes are any good (I like breaks if that helps)? I’m going to a new years party Friday and wanted to have some more mixes.