Category: Flash

  • MUD Hyperlink Engine & XML Creator

    Another one of my failed experiments. Assuming some of the code is salvageable or perhaps one can learn something.

    Attempting to build a piece of a bigger game, and this started as a MUD engine of sorts where it’ll read an XML file, and you’ll interact with speakers. They’ll say something to you, and you can respond by clicking the hyperlink of what you want to say, in effect, having a limited interactive dialogue. The XML format was complicated, so I attempted to build a tool to easily create the XML files vs. writing some cryptic XML format in Dreamweaver all day. After a week, I’ve lost interest. Too much trouble for what I want to do. Back to the drawing board.

    D&D Simple Game: MUD Engine & XML Creator – ZIP

  • Draw Lines with Undo

    Question on Flashn00bz mailing list stuck with me today. A bloke wanted to draw some lines, one at a time, and then have an undo that you could actually see. I figured the command pattern was where it was at.

    Upon getting home, I tried working on a side project, but couldn’t concentrate (lot on my mind), so I fiddled with this. Was a lot easier than using that bloody pattern. It has undo as well as undo all, and you can see them undo. Draw on the gray square via clicking and holding, drag your mouse, and let go of left mouse click.

    Drawing Lines with Undo – HTML | ZIP

  • XUL Controls Inaccessible via JSFL

    …but not the other way around. Co-jacked, I know.

    Check it:
    – save the JSFL file wherever you want.
    – save the XML file wherever you want.
    – open Flash, make sure you have a fresh FLA open, go to Commands, and choose “Run Command…”.
    – select the JSFL file and click open
    – select the XML file and click open

    Notice that the button you click runs a JSFL function, but the function itself cannot call any native XUL methods on the control.

    The JSFL

    var fileURL = fl.browseForFileURL("open", "Select file");
    var propertySettings = fl.getDocumentDOM().xmlPanel(fileURL);

    The XML

    <dialog id="sample" title="Sample" buttons="accept,cancel">
    <script>
    function test()
    {
    alert("Ok, JSFL Launched this, but I can’t access the same button that launched this code…!");
    some_btn.label = "I wish this worked…";
    }
    </script>
    <label value="Click the button called ‘some_btn’" />
    <button id="some_btn" label="Click Me" oncommand="test();" />
    </dialog>

    I found out yesterday that Mozilla, and I think Firefox too, support this via getObjectById, or whatever. Basically you pass the object’s string name, and it’ll return the form control, just like accessing it via documents.all or however one does in IE.

    …this doesn’t work in Flash, though.

    Frankly, I think this is the last, important step that needs to be done to truly have JSFL make Flash extensible. A lot of custom form applications cannot be done using XML and JSFL alone… merely because the forms are only there for data holding; period. You cannot actually populate data into them in an interactive, and meaningful way. They are nice for simple text fields… but that’s it.

    In the meantime, I’ll just use the Flash tag, and write a form SWF to run in a panel, but it’s still lame. After messing with XUL in Mozilla last week, it’s pretty quick compared to Flash in forms creation in my opinion. If your trying to do quick utilities, XUL is where it’s at. I hope Macromedia finishes the implementation; it’d make Flash more rockin’ than it is now.

  • A Hybrid’s Fear

    The title’s a statement, but to me it’s a question. Maybe I have low self-esteem and don’t know it, but I could of sworn that someone who comes from Java, and has a year experience in Flash vs. someone like me who comes from Rollerblading and a brief stint in Director is certainly worth more than me. In what context is worth? In terms of marketability to an employer for a “Flash Job”.

    This by no means implying that they, a Java programmer utilizing Flash, is better than me at accomplishing a task set before them. Anyone feels the need to test my skills, I reply with a “Bring it the *beep* on, sucka!” However, they do have many advantages, the key mainly being comfortable with OOP, design patterns, and experience in another mature language to give their new world context to compare things to. My compensation to that is to lay down some timeline skillz with design funk, drop some audio talent, and crank the video utilization to create a top notch presentation; the Rich in Rich Internet App.

    Now, it’s not fair to clarify and attempt to nail down a recent job title in the technology world, especially the progressive one we’re in. However, it’s what I have to work with, time is short, and we need to move forward towards a point. The work people are doing with Flash has been diversifying since the days people started screwing with it. Animations, banner ads, prototypes, alternative graphic format, devices, web applications, Flash panels, stand alone fat client’ish applications, integration with other fat/thin clients, web meeting platforms, interactive videos, kiosks, eLearning… all are marketable job positions, excluding alternative graphic format. That, to me, is given to SVG. That’s how every firkin retarded article starts. Blah, blah, blah… vector render via XML, blah, blah, blah…

    The same java programmers I’ve been answering questions for the past 2 years suddenly get to my level, and then start surpassing me. Granted, it’s funny to see them wielding around terms like “abstract classes” and bitching about the limitations of interfaces this, and frame delay that only to scream like a little girl when they have to do something timeline related. The pleasure is short lived. I see on the horizon an upgrade to Flash satisfying my soldiers in arms, the designers. The only reason I program Flash is so I can hang with designers. Granted, my last 2 jobs I have been lucky enough to have had the opportunity to work with some insanely talented and intelligent developers from all disciplines in which I siphon as much knowledge as possible before I get shot by the duck with the gun. Regardless, my technology is successful for one reason: my stuff is cooler than the regular stuff. Period. Point-blank. I look cooler than you, and even if I don’t work as well, the user thinks I do. And that good looking candy has spawned Flex to satisfy the bored Java developers who already have a phat language but lame ass GUI… until now. “Son of a…”.

    So, uh… the new Flash WILL have developer improvements, but I’m not sure how many developers will stick around. I mean, Flex has cooler stuff than Flash has; a few extra controls, fixes, layout classes, etc. The development paradigm is largely familiar to most developers it seems, form based which I hear is popular amongst them, and has already taken off with some great fanfare. Difficult to see a rocket launch into outer space here in Atlanta since Houston, Texas is faaaaarrrr away, but I know it happened, listen to the news, and see it on TV. Same with Flex. Hell, if people like Darron Schall can make money, and have positive things to say about Flash forms, I’m clearly missing part of the picture.

    And finally, the point. People seem to think I don’t give myself enough credit, but as far as I’m concerned, I have about 6 months left to be “complacent”. It’s only natural that as a technology becomes successful, supply seeks to balance out the demand. As an early adopter, however, my door prize is merely a head start. I feel I am valid in my worry about needing to ensure other areas of my technological knowledge and talent base are covered, mainly towards those experienced, “true programmers” who have embraced Flash. Maybe there’s solace in coding Flash 4 on a Palm Pilot. …naw, heck with that. I like competition, don’t get me wrong, but it seems the fear isn’t valid via others’ questioning, but I think it is.

    BTW, 6 months is merely a guesstimate on past timeframes of technological vs. business need changes in terms of what is in demand.

    Mention of Flex’ positive response, near bottom.