views:

234

answers:

2

What is this SWX data format that I keep hearing about?

  • The Wikipedia article says: "Data is stored as SWF bytecode, that is interpreted by Adobe Flash Player."

  • Their official site says: "SWX is the native data format for the Flash Platform.", and there are many examples of sites which allow users to modify/update data.

Does this mean that:

  • Data is stored following the open Adobe SWF-specification meaning that data (arrays/objects) can be loaded directly into the Flash SWF as SWF movies.

  • Data is stored in XML/SQL and when Flash requests the "SWF" file, server-side code generates an "SWF" file and passes it on to the Flash SWF.

+1  A: 

"SWX is the native data format for the Flash Platform" is a very confusing statement. The short answer to your question is (from Wikipedia):

SWX data files can be loaded into Flash movies with:

  • ActionScript 2, using the Flash internal function loadMovie().
  • ActionScript 3, using an SWX API function, when data is received, SWX
    dispatches custom events.

This means SWX is not a "data format", but rather the specification for something written in normal SWF bytecode. Otherwise it would not be loadable using internal Flash functions. (The reason why AS3 needs an SWX API function is that AS3 is less forgiving than AS2.) So your first alternative ("following the open Adobe SWF") is correct. A good example on the official web page is:

just like JSON is a subset of JavaScript

In your terms, JSON is JavaScript, and correspondingly, SWX is SWF.

bzlm
+1  A: 

Have you seen the website for the SWX format? Hopefully that (the linked page in particular) should answer your questions.

Noldorin