Making another appearance this year at MAX was Alchemy, Adobe's C/C++-to-AVM2-bytecode compiler. It seems like really interesting stuff -- I haven't yet had time to really dig in and try it out myself, but I can definitely imagine putting it to good use. Wondering whether any of you've had a chance to have a look at it yet, and if so, ...
I was going to make an AIR application but I need to execute an external application and because of the security restrictions in Adobe AIR... I was thinking why not try and bypass it by writing some C code that does something like System("file to execute"); and then use Alchemy to change it into a swc and us that in my application... ...
I've gone over the Alchemy quick start guide and exported my stringecho.swc successfully, but I don't want to compile in Flex. I just don't know Flex and I'm not very keen on learning it all of a sudden. I tried to do my business in Flash, instead, considering that they both run on AS3. The Flex code they give as an example is
package
...
I am using Flex's Alchemy library to generate SWC's out of C files. I have a byte array (unsigned char buffer[size]) in the c-layer that I'd like to return to the ActionScript layer as a ByteArray. Do I have to iterate through the array and explicitly call AS3_Set on each element or is there a way to just return the entire C array at onc...
I have seen a few blog entries on this and have had a discussion or two with my team mates but I would like to see what the stack overflow community thinks.
So why does the Adobe Alchemy Tool create so much faster running flash byte code than the flex compiler?
Also, when will the flex compiler be able to make similar performance gain...
I'm porting a cross-platform lib I use to Alchemy. One particular file has a block of code similar to this :
#if defined(WIN32)
// Do some Windows-specific stuff
#elif defined(__linux__)
// Do some linux-specific stuff
#endif
I now need to add Flash-specific code (NOP in some cases), but so far I've been unable to find what do...
I'm trying to port a big library to Alchemy. I've run into something that looks like an Alchemy bug. I have a class with a static member. There's a static function that uses it. Something like this:
In foo.h:
class Foo
{
static Bar m_pBar;
static void doSomething (int a);
}
In foo.cpp:
Bar Foo::m_pBar;
void Foo::doSomething...
How to convert AS3 ByteArray into wchar_t const* filename?
So in my C code I have a function waiting for a file with void fun (wchar_t const* filename) how to send to that function my ByteArray? (Or, how should I re-write my function?)
...
How to use compiled LibPng sample? I have compiled it (lib png) now I want to use it with bitmap data. Can any one please share some simple AS code for USING compiled lib png?
...
I've found that if you specify a path to Alchemy's 'ar' tool, it won't create the 'l.bc' file necessary to link the library.
For example, here is the case when I don't specify a path (it works):
asimmons-mac:test asimmons$ echo 'int main() { return 42; }' > testmain.cpp
asimmons-mac:test asimmons$ echo 'int test1() { return -1; }' > te...
I have a project I'm trying to compile with alchemy. It will compile .o and .a files, but when trying to create a .swc, it will fail. It appears to crash with this error:
g++ -swc -o mylib.swc my-flex-interface.cpp mylib.a
Cannot yet select: 0x279c810: ch,flag = AVM2ISD::CALL - A call instruction 0x279c7a0, 0x29c4350
0 llc ...
Here is my function... I don't know why it's not working. The resulting image looks nothing like what the .png looks like. But there's no errors either.
bool Bullet::read_png(std::string file_name, int pos)
{
png_structp png_ptr;
png_infop info_ptr;
FILE *fp;
if ((fp = fopen(file_name.c_str(), "rb")) == NULL) {
...
I'm using Alchemy in Flex to play some ogg vorbis. Works great, but I can only get one stream to play at a time. When I start a second stream it just sounds all glitched and you can only hear the second stream.
Anyway to mix (mux) more than one stream together, and then possibly have separate volume controls for each, so the user can m...
hello can you prvide an example how to parse xml file in adobe alchemy.
im trying to work on expat, however i got no luck on passing of bytearrays to
and from the c code.
do i need to pass the byte array of file to the alchemy, or is it enough to pass the filename.
thanks.
cbs
...
Hi all.
I work on port of some casual games to Flash.
They are based on OpenGL. Used OpenGL version is 1.x mostly. Game engine relies is 2D. It bases on OpenGL textures and simplest glBegin/glTexCoord/glVertex/glEnd. Blending and tiling is used too.
The question.
I do not want to reinvent OpenGL again. Please tell - maybe you know simpl...
Hi,
My question is sort of a follow on from this question below but I thought it'd be best to start a new question.
http://stackoverflow.com/questions/3211755/help-converting-this-as3-code-to-pixel-bender-code
So I have a waveform drawing implementation in flash that extracts pcm data from an mp3 and draws a waveform at multiple zoom ...
I'm trying to use AS3_Shim in my alchemy code but it doesn't seem to be working. It always returns a NULL function pointer. There don't seem to be any examples of AS3_Shim's use, so I'm not sure what I'm doing wrong. Here is some example code:
static AS3_Val thunk_logtest(void *self, AS3_Val args) {
// warning: this leaks
AS...
The following code tests the use of std::map with std::string as a key:
#include <stdio.h>
#include <map>
#include <string>
using namespace std;
typedef map<string, int> test_map_t;
int main(int argc, char **argv) {
test_map_t test_map;
test_map["test1"]= 1;
test_map["test2"]= 2;
test_map["test3"]= 3;
str...
Is there a way to open RAR / zip / 7z in AS3? Thanks.
Is it easy to use compression library in C with Alchemy?
...