Category: Flash

  • Undead Commands: Member Vars on Activation Objects

    Using some ARP commands to help manage some Flashcom connection complexity. I’ve stuck the NetConnection on the Model (aka Cairngorm ModelLocator). Inside the command, I utilize a Delegate to point to a callback in the Command.

    Model.nc.onStatus = Delegate.create(this, onNCStatus);

    About 5 commands later, I was seeing a trace from that onStatus. Since commands are created as local variables in the CommandRegistry or CommandTemplate, they die after they are done since there are no more references to them once they call their callback function. This doesn’t necessarely mean garbage collection cleans it, but it does ensure it should eventually.

    However, I forgot my Delegate function was creating a longer lasting link by mapping the NetConnection sitting as a static variable on the Model Singleton class. Since Model.nc wasn’t going anywhere since no one ever deletes him, the Command that held the callback function for it’s onStatus never left either. If I got an error message, I’d get a trace a few commands later, and was like, “WTF…?”.

    So, now, I just clean it up via:

    Model.nc.onStatus = null;

    Whenever my command is done.

    This is the 2nd time in 2 weeks I’ve gotten bitten by member references in local variables that co-chill on the Activation object to make them live like member variables; meaning, they don’t necessarely die at the end of their current function like you’d think they would.

    When sharing data between 2 SWF’s, 1 of the objects in an array was referencing the loaded SWF; even though there weren’t any security restrictions because of same domain, this wreaked havoc on my code not getting values it was expecting; it’d get an array, but all the objects in it were undefined.

    So, I just made true, deep copies manually. Sucked, but again, reason #35 billion squared for an Object.deepClone() intrinsic method.

  • Macromedia Flash 8 Credits – JXL Cameo Part Deux

    Reading LordAlex’s posting, and was like, “Wow, I wonder who else is in there that I know?”. That way, at parties, I can be like, “Yeah, I know him… he’s pretty cool. I know him too, he owns me on Halo. I know her, I know that dude…” since at parties you typically open the Help > About dialogue in Flash 8 over a brewsky.

    Low and behold, I’m in there! I had the same feeling I had at MXDU 2003 while on stage with the rest of the developers from around the world answering audience questions, begging the question, “W…t…f.. am I doing up here?” Pretty damn cool, your welcome Macromedia, I strive to ensure the world knows Flash rocks and they should use & love it too.

    I of course return with a “And, thank you, Macromedia!” for Flash. I got a phat career because of your product and get to wake up everday doing what I love and getting paid bling for it. You all rock!

  • The Making of Flash 8 – JXL Cameo

    Even as I am now a full-time Flex contractor, I still utilize Flash 8 in more than half of my daily duties. I really am impressed with the quality of this release. As I continually scan the lists, I’m seeing a steady stream of feature discussions, both old and new, which indicate no overt problems with utilizing the product by users, instead focusing on creating & using.

    Watching the video, it was weird; it felt like watching those NASA documentaries where they talk about how they sent their rover to Mars, except in this case, you’re like, “Dude, I know that guy! Hey, I met and talked to her!”. Very cool to see a behind the scenes look at the hard work the Flash Team puts in. It shows; millions around the world use and love Flash, me included. Also, it really gives you a greater appreciation for the product as well as a level of respect to those who can pull it off.

    “The Making of Flash 8” Documentary Film
    http://www.macromedia.com/devnet/flash/video/team/

    BTW, check out my ghetto-looking self!

  • Wireframe Components Using Flash 8’s Scale9

    Scale9 doesn’t suck. When I originally saw it, I wasn’t impressed, but apparently was too quick of a judge.

    I’ve been doing more and more wireframing this past year for projects. One could also call them storyboards since a lot of work in Flash & Flex has a lot of potential crossovers. As the projects get bigger in scope, and I get bequeathed more responsibility (or take the ball when no one else does), the opportunity arises to lessen the need for MVC; planning out your application before actually building it.

    From talking to Enterprise developers, in both application development and web development, I’ve found both utilize a lot of planning. I’ve historically hated planning. You show me a design of an application you’d like to build, and I can see it within seconds in my head how it works, and start laying the groundwork as well as the framework to ensure a good scope creep defense. As things get bigger, however, it becomes harder to wrap my head around the whole enchilada unless I write it down to challenge my, and the client’s, assumptions. Not to mention the fact I’ve lost all patience with re-work because of a misunderstanding of functionality up front.

    …however, I don’t own Visio or Illustrator. I do own Flash with a pimp stylus, and with Flash 8’s improved text handling capabilities as well as runtime rendering, she’s a viable choice. The 2 problems, however, are the temptation to utilize real GUI components which defeat the purpose of no design & technology commitment that you get with wireframing. The second is, if you are using Flex components, those aren’t in Flash, and screen capturing implemented prototype designs, while quick to make in Flex, aren’t flexible enough once you’ve turned them to bitmaps. A change in layout causes you to do the whole process again.

    So, until I start doing enough wireframing to justify purchasing Visio (Open Office? No thanks, tried it, no like it), I’ve built these Wireframing Components for Flash 8 that allow you to layout your GUI without implying a design style, or even a technology for that matter (excluding Flex’ Panel component). Most utilize Scale9, so they scale well both at authortime, and when you publish a SWF (or image or image sequence). Additionally, a few have text capabilities, so your buttons can show labels and your text boxes can have h@wt, latin text. I’ve even included Flex’ popular Panel with toggeable close button and control bar.

    If you are good at Flash, and have the opportunity (curse?) of having to do some wireframes of an application, these components should help you out. They are plain in look, efficient in resource usage, and look the same at authortime as they do at runtime. They are not interactive at runtime to ensure no implication about functionality is made.

    2 things to watch out for:

    • if you utilize the “,” and “.” (comma and period) keys to go forwards and backwards in a SWF file, the components will break; don’t know why. Instead, implement button and/or keyboard interaction if you plan on showing a SWF to someone.
    • if you choose to look at the source and compile yourself, keep in mind I had to edit the mm_livepreview.as that comes in your Flash’s Include folder. Make sure this file is next to the .FLA

    Wireframe/Storyboard Components – MXP | Source Files ZIP

    Example Usage

    Authortime

    Runtime