Blog

  • Ant Task to Preview Flash in Firefox

    For the app we’re building, we have to preview in a browser to get it to work. I’m still working on getting it to deploy with our war file, but for now, we can at least test our changes quickly in a browser. I know this build file isn’t perfect (disclaimer: it’s my first one), but it was a little tricky getting Firefox to open up our pre-made HTML file that housed the SWF and I figured it’d save someone else the time it took my manager and I to get the filepath right. Here’s the results of that, with an optional opening with the Flash Player instead commented out. Additionally, we’re working on getting our HTML & JavaScript to replace the current Flashout one, but for now, I had fun learning Ant so I could help our Java developers get our files into the build process.

    You can use this task with Ant in Eclipse utilizing MTASC. More information on utilizing Ant with SWFMill & MTASC can be found here at OSFlash.

    flashbuild.xml

    BTW, anyone know of any good HTML/XML beautifiers that are online? Thanks!

  • Skype vs. Cell Phone

    I work from home 3 days a week, and go into the office once a week, and usually use Friday’s for school and stuff I’ve been putting off for 3 weeks. As such, I spend copious amounts of time on Trillian or the phone interacting with work colleagues.

    Last month, my cell phone bill was over $57. I felt that was kind of expensive. Looking at the details of my bill, the culprit was I went over my minutes; I have 500, used 1380.

    So, today, I installed Skype with a co-worker, and it works pretty well when your not in the middle of hurricane Daniel (or whoever is the problem child of the week). Free, good quality voice chat, and with my headphones and mic, it’s hands free (co worker has a headset he bought for 24 bucks while I just use my DJ headphones and my default, duck taped to monitor gaming mic). No setup beyond installing a program and filling in your name and you can receive calls which are voice chats from other people on your contact list; like receiving an instant message that you answer. You can use cell phones and landlines, but I’m not paying for that jazz.

    We tried to conference in a Java-skillet from Arkansas, but his satellite internet was iffy. We could hear him sometimes, other times it was this hilarious Amy-Amy, Good Gorrilla types of sounds (text to speech elongated [“Congo” Reference]).

    Anyway, that should shave off a ton of minutes.

  • Flash JavaScript Integration Kit HTML Modification

    First, a confession. I was kind of a dick to Mike Chambers about his and Christian Cantrell’s Flash JavaScript Integration Kit last week. To me, I find the whole use of Flash and JavaScript talking is ridicolous in terms of using it for AJAX like functionality; Flash has asyncronous XML and so does JavaScript; why mix the two?

    Additionally, the only project I ever had in the past that required Flash talk to JavaScript was kind of stupid anyway; I had Flash controlling Windows Media Player videos since the content was already in a million dollar content management system, and Flash video was out of the question (meaning I couldn’t sell them on it). So, although I managed to get it to work with fscommand’s to JavaScript (since using getURL to control volume of a WMV file through JavaScript didn’t work because getURL was refreshing the page), I still thought it was stupid, and the only point of every using JavaScript and Flash was if you needed to hack some functionality in.

    …of course, I got paid good money on the project, money which I 2 years later quickly passed back to the IRS (wtf?). Regardless, it was a project I did, and needed functionality for and successfully implemented. Would it have been better to have MC’s(get it?) integration kit back then? Yep; switch statements with fscommand and watches on _root blow when dealing with AS2 and trying to be OOP.

    We have a need for Fileupload in our current project. Remembering my pains of the past, I quickly downloaded their kit to see if it’d integrate into our workflow better, and low and behold yes. I can’t get it to work in an ARP command (I think because commands are local variables, kept around only by the activation object, and this is causing issues…?), but it works great in our main class.

    So, since Yamago’s YamzBrowser is AS1 and uber-haxorish with FlashVars initing SWF’s, I’d rather just use the necessary JavaScript to let JSP tell us what’s up, and either JavaScript back, or LocalConnection back; works on another project, so cool, we’re just making the JavaScript and Flash cleaner this project.

    This is the 2nd project in my lifetime that’s required hardcore JavaScript and Flash interaction; and I’m getting paid for both… that kind of solidifies the need for what Mike & Christian created and confirms it’s validity… oops, I’m an idiot, and my technology bigotry comes through loud and clear. Sorry guys, I was wrong.

    One problem, though, is the Wiki docs currently have the FlashTag write to the document. This ends up replacing your current webpage with the Flash embedding. Since my team is mainly Flash, we managed to figure out a better way (which to a web-head, I’m sure there’s an even better way, but this way works pimp).

    We load the Flash into a div tag instead, which I’ve done many times in the past to better control positioning and styles. So, while the Wiki (currently) says this:

    <script type="text/javascript">
        // The arguments below are path, width, height, and Flash Player version.
        var tag = new FlashTag('/path/to/flashContent.swf', 300, 300, '7,0,14,0'); 
        tag.addFlashVar('lcId', uid);
        tag.write(document);
    </script>

    To put it in a div tag instead, we did:

    <script type="text/javascript">
        var tag = new FlashTag('/path/to/flashContent.swf', 300, 300, '7,0,14,0'); 
    tag.addFlashVar('lcId', uid);
    myDiv = document.getElementById("flash_div");
    myDiv.innerHTML = tag.toString(); </script>

    And the div looks like:

    <div id="flash_div" style="width: 600px; height: 600px;"></div>

    It works damn good; thanks guys!

  • Jakob Nielsen on Flash Scrollbars

    I got this story last week from her majesty, and got a lot out of this article. Best quote (last sentence is the key):

    The main guideline for a scrollbar’s look-and-feel is simple: Use your platform’s standard scrollbar, which is what users know and expect. When designing for Windows, use Microsoft’s widgets. When designing for Mac, use Apple’s. And if you’re using Flash, use the standard built-in GUI components.

    That implies to me that Jakob Nielsen is recommending to use the v2 component framework. It’s really nice to see Jakob helping us Flash designer & developers, specifically. Thanks, J!

    Patrick and I had a 2 millisecond “negotiation” about who would blog this, but DigitalMediaMinute beat us both…

    Scrolling & Scrollbars