Blog

  • AS1 version of EventDispatcher

    Don’t know if I’m allowed to post, so rather than be sorry later, I’ll just explain what I did as it’s pretty easy to repeat.

    Manager needed to compile app last week, so I had to convert all the AS2 to AS1. The main issue was EventDispatcher… <strike>he</strike> she was written in a pattern/manner that I was not familiar with. So, I just started hacking to see what worked.

    I first put everything on _global, instead of the functions in a class definition. Since the majority of the methods were static (Singleton’ish?), I just put those methods straight on the classes, AS1 style (_global.EventDispatcher.initialize).

    Second, I deleted all the first 4 lines in the initialize function.

    So far, <strike>she</strike> he works great!

  • Live Meeting

    Dude, I saw this on TV last night as a commercial, amongst other goofy arse Office commercials. However, the Live Meeting one was pretty cool. If Microsoft is spending this much marketing dough on <a href=”http://office.microsoft.com/home/office.aspx?assetid=FX010909711033&CTT=6&Origin=ES790020011033″>Live Meeting</a>, I can see why Macromedia made <a href=”http://www.macromedia.com/software/breeze/”>Breeze</a>/Breeze Live. With globalization now a process & streamlining initiative for companies, it only makes sense that enabling products and services to empower them to do so shall follow.

    …I just wish my place in the Flash ecosystem was more so that I could contribute. Let us hope that the Breeze API + Pods are an area in which I/we can do that.

  • XML vs. AS2 part Deux – scoping callbacks: Inheritance

    That insanely smart Canuck (at least, I think he’s a Canuck; <a href=”http://www.gskinner.com/blog/archives/000065.html”>too cute not to be</a>), <a href=”http://www.gskinner.com/blog/”>Grant Skinner</a>, has <a href=”http://www.gskinner.com/blog/archives/000069.html”>posted</a> a neat way to utilize el activation object to quickly and easily scope your XML objects (LoadVars same way). Nestled in composition ‘esque classes, this is a great way to wire your XML document’s callback to your class so it can call a custom parsing method, etc. Better yet, if you place a var in front of the creation of the XML object, he’ll die when garbage collection comes along (supposedly).

    However, I don’t agree this is a best practice. Course, nothing in Flash is really documented as such, most Flashers just generally agree and double check with Java peeps to ensure we can feel good about our decision to do so.

  • Save as MX from MX 2004 Gotcha

    I converted my AS2 to AS1, and saved as MX so my manager in Florida could compile the app. However, he was getting rogue symbols in front of his #include scripts, causing errors and not allowing the FLA to be compiled.

    He thought that maybe it was the FLA since he had copied and pasted the text into a new file and saved around the affected area, deleted the actions layer, and recreated, and still no dice. I was worried since if you can’t save as MX, what then?

    Turns out, however, from a <a href=”http://www.macromedia.com/support/flash/ts/documents/howto_2004astomx.htm”>Macromedia technote</a>, that it is in fact that text files that are the problem. Flash MX 2004 saves your classes with UTF-8 Encoding. Flash MX does not support that encoding type for #include files. So, just saved them as ANSI, and good to go.

    So, if your saving as MX, don’t forget to also save your #include files as non-UTF-8 encoded.