About instance metadata in FP (continued)

Today Buraks released their final version of ASV update that supports PlaceObject4. And, I had to say, they did better job with their tool than Adobe did with their Flash CC. This is how metadata inspector dialog looks in ASV:

This is how it looks in Flash CC:

That’s not the first time the team of two does better job at tooling, so why should it be surprising? Any way, this inspired me to play with PlaceObject4 tag again.

What else is new?

Last time we learned that PlaceObject4 can carry complex nested objects, and “Integer, Double, or String” limitation is that of JSFL, not flash player runtime. It turns out the runtime does have limitations of its own – for example, you can’t have plain data there. If you place a string at the end of PO4 tag, flash player will not complain (you don’t get VerifyError) but corresponding metaData property will be null.

Btw, metaData is not really a property, but a reference. Documentation says it has a setter:

public function set metaData(value:Object):void

but IRL any attempt to use it results in TypeError #2004. However, if you change the value of the subfield, it sticks. So, metaData object is created once and the reference is returned from there on.

Another thing to know about instance metadata is that you can make it strictly typed. If you have the type registered at the time of publishing SWF, you will be able to specify what type will the metaData property be of when you access it. Make sure that corresponding class has default constructor, or else accessing metaData property will throw ArgumentError #1063.

But we still need tools to write that metadata :(

Right. Unfortunately there are none, and you will have to write your own. But don’t be sad – I can give you head start:

Angry Birds

You’re welcome :) I originally wrote this with wonderfl in mind (hence 465×465) but they do not compile version 19 SWFs yet. Not tested thoroughly, feel free to report/fix bugs.


0 Responses to “About instance metadata in FP (continued)”

  1. Leave a Comment

Ask a Question

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Old stuff

September 2013
« Aug   Oct »

Oh, btw…


%d bloggers like this: