Converting code to a String?

I’m sure this doesn’t exist, but just hoping that by some chance, it might.

Since Action Script is an interpreted language, and it is clear by decompiling animations that the code is still in there, is there any function that lists the code of a function or class as a string?

Basically, I want to create a suite of components for developers that lets them make modifications to or at least view the code behind a component while the animation is running, and that way make it easier to find bugs, instead of having to stop the animation, dig up the code for that class, and recompile it. It would be even handier if it was possible to edit code **while **the code was running, so the next time Flash encounters that code, it will instead run the new code. Yes, if used unwisely, that could cause a lot of problems, but the benefit outweighs the risk, and that feature is used in such development environments such as Visual Studio.

Likely, the only solution to that would be to give each class a “code” variable, likely a String. Then when the users click the button to view that certain source, it checks for the “code” variable and displays the contents. The problem is that you have to remember to update the variable each and every time

Perhaps I can write an extension for FlashDevelop that does that automatically? It could just update that variable at compile time. Shouldn’t be too difficult.

Yet, I really hope Flash has anything that would work to avoid any unecessary coding. :stuck_out_tongue:

:gm: < “You put the ‘stink’ in ‘extinction,’ and I’m merely using the one to rid myself of the other.”