Close Show/hide page

Archive for the ‘tutorial’ Category

An SEO implementation for Flash

Thursday, April 23rd, 2009

I recently added SEO to my current (Flash-based) portfolio site, which I did as an experiment more than for any actual use value. You can navigate the HTML ‘back-end’ pages starting from here, if interested. I figured I should jot down my findings on how it can be done, for the record.

I. Client Side

On the Flash end, two requirements:

(A) Your site must implement deeplinking, presumably using SWFAddress, such that every page view has its own URL path. And your shell class must be intelligent enough to go directly to any given deeplinkable page view on startup via the URL deeplink.

(Sidenote: While not strictly necessary from an SEO standpoint, having gone that far, you’ll probably want all changes to the page view to be driven by the SWFAddress URL-change event, rather than directly by user events like mouse clicks, etc. Which will force you to throw your familiar, tried-and-true coding patterns out the window. And potentially, your laptop thereafter. But is beyond the scope of this entry. ;)

(B) Your site should use an external data source that describes the site structure and contains the site’s text content, as well as, typically, image and/or video URL’s and the like. Usually, this would be a well structured, static XML file whose node structure corresponds to the site’s actual page structure. The deeplink ‘crumbs’ should be included therein as well – as an attribute of each node, for example. (Extra points for using a database or a CMS instead). And it goes without saying that your Flash should be building its site structure, nav, and page content dynamically using all of the above.

(more…)

Using AMF3 for the cool shit

Monday, January 19th, 2009

(A more descriptive but less catchy title would’ve been “Serializing and deserializing value objects with ByteArrays using AMFPHP, PHP, and MySQL.” But that’s ok.)

As we are now in the year 2009, for some reason you feel like there ought to be a way to take your cool shit, send it over the wire and get it back again, without having to resort to 99 searches on Google, a trip to Barnes & Noble for a stack of books with ugly green covers and stupid illustrations of birds and salamanders, and a spare weekend you’d be doing nothing better with anyway. Your cool shit’s in Flash, most likely, and it’s not just text data, presumably, so by a process of elimination we conclude that your shit — not of a lukewarm nature by any means — is most appropriately represented by a series of ones and zeros — in binary format. And that you want to get it on the database. ‘Cuz you can’t create the next viral sensation if you can’t get your cool shit to the database, now can you?

And while many prosaic and generally annoying 3-to-4-letter acronyms exist for the transmission of information across the proverbial ’series of tubes,’ unfortunately, most of them are founded on that most old school of information encoding conventions: the alphabet. (But if it’s in UTF format, maybe we can be a little more forgiving and call it “Alphabet 2.0″). Sure, you could do something like MyCoolAssStaticUtilitiesClass.convertMyCoolShitToBase64($o:Object), but nah, fuckit, it’s the year 2009 damnit, and you’d think there’d be an easy way to take your data – made on a computer – and store it – again, on another computer, without having to first convert it into “human-readable text,” whatever the fuck that means.

Furthermore, if your shit’s actually as cool as you say it is, we must be talking about something that’s not just a single block of binary data like an bitmap, oh no, but a complex data object, full of mixed primitive types, maybe some untyped objects and an array or two, other value objects nested inside of them, and _then_ maybe an image or two. But the main thing is, it’s stuff that you want to just dump into a field in a database record, and get back, without the extra drama of converting to and from XML with a couple extra hundred lines of code…

Anyway, presented here are the important points I learned about using AMFPHP with ByteArrays and VO’s while starting on a new project/experiment thing involving user-generated character animations of 3D models, which naturally involves lots of binary data and complex data types.

:P

(more…)

Personal wiki of developer notes

Wednesday, April 30th, 2008

Kind-of just for the hell of it as much as for any potential use value, I’ve converted all my notes related to programming, Flash, etc. – which used to live in various text files as various versions on various computers – into a wiki format. And have made it publicly viewable. Because, I figure, why not?

http://wiki.zeropointnine.com

Much thanks to Adam Smith for the idea. Have fun in L.A.