Just as an aside, another tactic is to compile the code server-side to
a .swf and load it as a module. If it's AS2, MTASC is plenty fast
enough to do that - if AS3, there's a server-resident version of the
Flex Compiler kicking around somewhere (I can't remember where at the
moment; you should be able to find references to it on Adobe Labs if
nothing else).

But if it's really as simple as the code you replicate here - why not
add some more XML tags and parse those? <fade id="img" param1=""/> or
whatever. And interpret at runtime. Do you really need to give your
XML file editors complete script access - with all the potential
runtime crash issues that might bring?

HTH,
  Ian

On Mon, Nov 24, 2008 at 5:02 PM, Julian Tenney
<[EMAIL PROTECTED]> wrote:
> I want to execution from a string from an XML file loaded at runtime. I
> have an application that edits xml to create content. You can edit code
> in there and it executes:
>
> <content>
>  <page>
>    <image id="img">
>    <script>
>      Img.fade(params...);
>    </script>
>  </page>
> </content>
>
> So you add apges, add various types of media to a page. The parser gets
> a image tag, instantiates the image class and creates an image on the
> page. Then script executes to call methods of that calss (like fade(),
> or animate() or whatever).
>
> So it's a bit like flex, but runtime, rather than compiled.
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Niels Wolf
> Sent: Monday, November 24, 2008 4:36 PM
> To: Open Source Flash Mailing List
> Subject: Re: [osflash] Runtime Interperters (was RE: Adobe Alchemy)
>
> Interesting.. Question really is do you want to transport data or
> execution
> in a string?
>
>
> On 11/24/08 3:41 PM, "zwetan" <[EMAIL PROTECTED]> wrote:
>
>>> This mght seem like a funny question, but is it possible to execute
>>> actionscript at runtime, from code loaded from, say, xml files?
>>
>> to a certain extend you can do that with eden
>>
>> http://code.google.com/p/edenrr/wiki/edenFeatures
>>
>> some projects like Andromeda IoC use this format
>> to configure the whole IoC
>> http://code.google.com/p/andromed-as/wiki/TutorialsAndromedA_IOC
>>
>> just to be clear, eden is not a full blown JS interpreter
>> (it's possible see the metal hurlant code based on the Tamarin esc
> code
>> http://hg.mozilla.org/tamarin-central/file/b95bf298a981/esc/)
>>
>> eden goal is just to have a small JS-like format that can use custom
> type
>> and maybe call method/function in the code
>>
>> so depending on what you try to do, eden could fit your needs or not
>>
>> cheers,
>> zwetan
>>
>> _______________________________________________
>> osflash mailing list
>> [email protected]
>> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
> Niels Wolf
>
> --
> Niels Wolf
> Department of Interactive Media
>
> MediaCatalyst
> Keizersgracht 268-270
> 1016 EV Amsterdam
> The Netherlands
>
> t. +31 (0) 20 626 2976
> f. +31 (0) 20 626 4026
> m. +31 (0) 634 658 783
>
> www.mediacatalyst.com
>
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses, which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to