Category: Flex

  • 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!

  • What Flex Builder 1.5 Really Does

    I’ve read all the posts this morning about Flex Builder 1.5, but they don’t say what it really does in summary, nor accredit it’s cool new features. Let me get that for you:

    – first off, you now have percentage based layouts, so like in HTML, width=”100%” and height=”100%” actually render in the Design Mode. They worked before in Flex Builder 1 published for Flex 1.5, you just couldn’t see your design without publishing; pain in the arse for Central development, hehe. Still, kind of neat to be able to use an older product to author for a newer compiler (although, Macromedia recomends you use the same versions of Flex Builder and Flex).

    – secondly, for those of you code freaks, you can actually remove Design View entirely. This provides significant performance enhancements when running Flex Builder, and uses a lot less RAM. I was using 190 megs Sunday, we’ll see how much better that gets.

    – third, she’s got some new components (already has all the cool ones Flash MX 2004 doesn’t). The best are the charting components which integrate with the CSS styles, and existing effects. The List’s have been improved, now inheritantly supporting variable row height, word wrap, and data tips. The first 2 are so in demand in Flash; that question gets asked ALL the time on the mailing lists on how to implement it in Flash. You can also change orientatation, like horizontal and tile. Finally, the components in the Extras folder were added in, but for some reason, they added 2 in there and not internally; ColorPicker and ImageButton.

    – Skinning is made easier with additional styles added to components, as well as examples and documentation for both Flash Designers and Flex ActionScripters.

    – Performance of runtime has improved too; both in application startup, layout with additional control on init order of components via a CreationPolicy, as well as effects themselves and how they are implemented on some components in particular, such as Panel (the most popular guy).

    – Finally, support for RSL’s. The people who should care about this are Central developers. Now, our Flex apps can be really small AND utilize some of the Central specific components (I think). I’ll work on an entry explaining how to use them in Flex Builder.

    More info here.