Category: Flash

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

  • 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

  • Flash Player 8 Beta: Please Test It

    Flash Player 8 Beta

    Like 2 years before, all you need to do is:

    • go to sites that have Flash and see if they still work and look like you expect
    • test on any Flash applications you know and make sure they are the same as above
    • install on a test target platform that you can install beta software on to ensure you have no installation issues
    • test the new update mechanism

    It comes with an uninstaller so you can easily uninstall when your done. The new update mechanism appears to be based off of the way Central installs products… sort of, so while it’s seamless and ubiqitous everywhere Flash Player 6.0.65.0 or above is installed, it’s a new way of doing things so it’s imperitive you test that, and give feedback and report bugs.