SWFAddress 2.1 & SWFObject 2 Work Together.
I spent a good hour yesterday trying to get SWFAddress 2.1 and SWFObject 2 to work together. First off, they do work together. Second, there's nothing to it. Then why did it take me an hour? Because I'm a dummy and I had the order in which each JavaScript set was called. In hindsight, this is common sense, but the golden ticket here is calling SWFAddress javascript BEFORE declaring the SWFObject. This more applies to people using the dynamic way of embedding the SWFObject. ie:
<head>
<title>SWFObject v2.0 - step 3</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/swfaddress.js"></script>
<script type="text/javascript">
swfobject.embedSWF('website.swf', 'website', '100%', '100%', '9.0.45',
'swfobject/expressinstall.swf', {}, {bgcolor: '#CCCCCC', menu: 'false'}, {id: 'website'});
</script>
</head>
Silly right? I saw a couple of posts out there of people having a hard time getting this going. Once I flipped the JS declaration, it worked. And I felt kinda dumb. But hey ... That's life.
BTW: both SWFAddress and SWFObject 2 are pretty amazing and should be worked into your site/app flow if they aren't already.
AVM1 Content in AS3?
So this is a pseudo rant/question for the masses.
I've been trying to load up some legacy content in CS3/AS3.
I've read all of the liveDocs on this subject and have figured out that you ...
A. AVM1 content is contained in a AVM1Movie class which you cannot extend
B. AVM1 content can only communicate over LocalConnection
C. AVM1 content cannot user loadMovie to load in additional SWFs.
So what we're talking about here is that AVM1 content is really only good for animating crap when someone in your office only has Flash 8. Here's why .. You could use LocalConnection to do some cross-scripting, but that would require you to have the FLA for the legacy content ... and this isn't always possible. At this point, should you have the FLA, the LocalConnection hack is like using the ExternalInterface class to communicate with JavaScript. It's not bad, but not ideal for cross-scripting between Flash content.
If you have access to the original FLA, why not just make it a CS3 doc. I know, I know, you don't want to recode everything .. but apparently you can't use LoadMovie, and I have all but 1 project in my whole career that didn't LoadMovie for something. Apparently you can use LoadMovieNum .. or something .. but at that point you're recoding ... and why not just set up a Loader() to do the deed.
Why the rant? Well ... I'm trying to load legacy content into a Flash 9 swf. However, I do not have access to the original FLAs. No big deal. I can load them in and play with them .. etc .. which is about as useful as loading in an animated GIF. The problem is, each SWF is expecting a variable on _root that would typically be assigned through the HTML EMBED tag or swfObject. Now if SWFs can get variables from the parent that embedded them, why can't legacy content receive data through the parent (Flash 9) SWF that loaded it?
I know it breaks the whole coding standards of AS3, but would it be too much to be able to assign dynamic variables to that magical AVM1Movie wrapper? or something? or do I have no idea what I'm talking about?
AS2/OOP OSX Editors?
It's been a while since I've written a post on here .. mostly because I just changed jobs. I was at Schematic in Boston before Monday. I'm at Almighty (also in Boston) now. Almighty seems like an awesome fit. Everyone there is pretty cool and they do excellent work. I could go into more detail about everything like why Almighty is better than Schematic, etc ... but that's for another discussion.
What is really bothering me is the fact that I'm on a Mac now. No, I don't hate Macs. I actually love OSX, and when I sold my Mac three years ago, I really missed OSX. Given that... my gripe is with the Flash community and the lack of a good ActionScript editor.
In the past two days, I've tried TextMate, SE|PY, and FDT for Eclipse. FDT seems like the best answer for what I'm looking to do, except I can't get code-hinting to work. TextMate is better than SE|PY in that it doesn't crash. However, SE|PY has code-hinting.
Now here's where the real issue comes from, I've been developing in FlexBuilder or FlashDevelop for the past year (FlashDevelop even longer). FlexBuilder is awesome for AS3. Code and class lookups, etc... and FlashDevelop has many of the same features. However, Builder doesn't like AS2 (am I wrong?) and FlashDevelop runs on .NET so kiss that idea good-bye.
Does anyone know of any good editors for OSX that are perfect for ActionScript 2/OOP editing, or should I keep trying to get FDT to work?
FlashForward & Books
We've been wickedly busy over the past couple of months. Outside of rocking our day jobs ( at Schematic & Rokkan ), we've been co-authoring a book on Adobe AIR with Todd Anderson ( of Schematic ).
On top of this, we're presenting at FlashForward, Boston in September. Our presentation is entitled, "Designers vs. Developers: How to Avoid Fights on the Playground." As the name implies, it's going to be focusing on how Designers and Developers can work together better by understanding some helpful tips and tricks of each of the disciplines. Matt & I are originally from a design education, but as it turns out, we've both weaseled our ways into programming/development roles in our respective companies. As such, we constantly rack our brains on how the two different sides of the office can work together better, or how designers could learn the basics of programming easier.
We'll hopefully talk more about these things in the upcoming months, as we get closer to launch dates.
Crummy Freelancers, Coding Guidelines and Actionscript Libraries
As of late I've been thinking about just how important it may be to have some structure for fellow Flash Developers at Rokkan. Naturally, this means two things: 1) A coding standards/guidelines document, and 2) some sort of "company" Actionscript library to pull from to support the guidelines and techniques. I really like the idea of these two things, especially after a little incident that happened recently when we hired a freelance Flash guy to help out during a busy spell.