Convert flash ui to XML document using ActionScript

17 views
Skip to first unread message

Ken Poindexter

unread,
Oct 25, 2008, 2:47:21 PM10/25/08
to ActionScript User Interface Development
Hello:

I am relatively new to ActionScript. I am searching for a way to
convert a flash ui (e.g. Application.application) to an XML document
for transmission to a server via an XML web service.

I've found several examples of converting objects to XML using the
SimpleXMLEncoder class, however, when I try to use the examples to
encode the Application.application object, it just hangs for almost a
minute and then never really renders any XML.

Does anyone know of a way to do this using ActionScript?

Thanks in advance
Kenneth

Evgenios Skitsanos

unread,
Oct 26, 2008, 8:57:10 AM10/26/08
to as...@googlegroups.com
Hi Kenneth,

Well, short answer is - you can't do that. I assume you want after all to execute application markup back on client when you receive it from server side, that is impossible. MXML compiler is actually translator-compiler, works exactly same way as we (at Skitsanos) did with BLOC some time ago, taking application markup, translates it into ActionScript and only then compiles into byte code.

Only thing you can do is to create sort of interpreter, where you will run quite a long loop to get a structure of all your objects and their styles and store it with xml representation, but it wont keep any behavior like event handlers and so on. So this xml you can pass to your web server and get it back. You will need to solve only this "little" interpretation issue...

Cheers,
Evi.
--
Evgenios Skitsanos
blog: http://blog.skitsanos.com/
twitter: http://twitter.com/skitsanos
Reply all
Reply to author
Forward
0 new messages