Category: Flash

  • XML to UI Examples

    Sharon Selden from Macromedia was responding to our increased interest in using XUL, an XML language used to create forms. There are some tag definitions on the net, but it was nice to get documentation and examples from the source. Additionally, she posted some XUL to UI examples, but the list didn’t allow attachments, so I’m hosting them for da group.

    …however, there were a few of us that had tried to use JSAPI with them, and met with little success in actually having JavaScript ‘esque control like you do in HTML pages. I had managed to populate some controls, but the jsfl runs in a scope that is different from your document, so there’s really no way to get data back from the XUL form… at least that I found. Muzak posted this link, but I haven’t had time to read the whole thing to see if it solves the whole thing. Hopefully I can find my answers in da zip I just uploaded. Regardless, XUL is sooo much frikin’ easier than a Flash panel… until you want to populate controls. We’ll see.

    Muzak’s link to a good XUL reference

    Sharon’s post of XML to UI Tags via LiveDocs

    Sharon’s XUL to UI Examples

    XML to UI Examples – ZIP

  • Flash Video: Negative Proliferation a Good Thing?

    Granted, my interpretation of negative may be positive to others, but I loathe spam, so whatever.

    Anyway, got this spam email in my work’s junk box, and right before hitting delete, a familiar image came into view. The video they were asking you to view (an image to trick you to going to their site to view it) had some familiar looking controls… Flash Video ones that come with one of the Media players. I’ve seen them on other sites, so immediately, I became intrigued. Scrolling down, they even had the form done in Flash…!

    I couldn?t get any of the url?s to work, but saving the email as HTML on my desktop allowed the Flash to play as normal. Wow? turns out, live SPACE mercial dot COM (eerily similar to http://www.mediadiva.net/) is promoting the use of Flash video in emails now. Craziness. Although I hope all spammers burn with excruciating pain in fiery hell, this is awesome! If millions have to suffer for proliferation of Flash video, heck, I?ll take this shot in the arm with pride!!!

  • Short Stint in Skinning Flash MX 2004 Components

    So, helping a friend today with figuring out how to skin the Window’s title bar and the ScrollPane’s Scrollbars.

    The first took some working, but originally, she looks like this:

    And using this code:

    _global.styles.Window.setStyle("borderStyle", "outset");
    mx.managers.PopUpManager.createPopUp(_root,
    mx.containers.Window,
       true,
       {skinTitleBackground: "test",
       skinCloseUp: "bu",
       closeButton: true});
    

    She looks like this:

    Notice in the above code, I pass in the skin variables in the initialization object. There is another to do this ahead of time as I’ll show you below. The strings are the linkageID’s of the movie clip’s I’ve created. The skin creation is really simple:

    – create a movie clip
    – put art in it
    – right click on the symbol in the library
    – give it a linkageID name
    – make sure it’s exporting in frame 1 (otherwise, you’ll have to put it manually on stage somewhere before you use it)
    – in the AS 2.0 Class field, type “mx.skins.SkinElement” (this makes the movie clip size with the component)

    Done!

    However, for components within components, you don’t have control of their constructors, nor access to them usually. Now, there may be another way to do this, but accessing the default skin properties is easy. In the ScrollPane’s case, here’s how he normally looks.

    However, if I want to skin the Scrollbar, I merely set the prototype values to something different than the default before creating the ScrollPane:

    mx.controls.scrollClasses.ScrollBar.prototype.scrollTrackName = "scrollbar_track_green_mc";
    mx.controls.scrollClasses.ScrollBar.prototype.upArrowUpName = "scrollbar_arrow_mc";
    mx.controls.scrollClasses.ScrollBar.prototype.downArrowUpName = "scrollbar_arrow2_mc";
    mx.controls.scrollClasses.ScrollBar.prototype.thumbTopName = "thumbTop";
    mx.controls.scrollClasses.ScrollBar.prototype.thumbMiddleName = "thumbMiddle";
    mx.controls.scrollClasses.ScrollBar.prototype.thumbBottomName = "thumbBottom";
    
    attachMovie("ScrollPane", "mc", 0);
    mc.setSize(320, 240);
    mc.contentPath = "test1.jpg";
    

    He now looks like this:

    Granted, now that I’ve set the prototype, all Scrollbars will use the same skins, so this method does not allow for individual Scrollbar skinning, but I’m sure there is a way somehow; I’m still learning.

    Hope this helps!

  • Generate Flex Component Code via Flash

    If this script was developed further, one could generate Flex component code by dragging Flash components to the stage for those more used to visually laying out forms vs. using the tag based approach. Anyway, works for Buttons and Labels. The Accordion started to get deep, so I’m pulling the plug, but thought it was a pretty interesting concept nonetheless. I wonder if Brady will work on a similiar concept using Dreamweaver’s JSFL?

    Generate Flex Component Code – JSFL