简体   繁体   中英

Using PHP to create AS2 functions

Is it possible to use PHP to create AS2 functions? Like load the php file from the swf file and have it [the php file] send a string like

 function test(){ 
     trace("test"); 
 }

and somehow get AS2 to read it as a function. The reason I want to do this is because I don't want anyone seeing 2 of my good functions in my flash file. I know about SWF Encrypters and things, but none of then can truly keep one out. Thanks.

Sorry for bad grammar or anything wrong with this post - it's 4 am here.

I don't think it's possible. I mean you could make calls in POST from flash and get php to send you back some code. But it would return as String so you'd have to code a sort of parser to transform that string in to real code in AS2, and that could be pretty complicated.

Not sure but you could make the server handle external .as files with PHP. Thus, your .as fiel would run as regular PHP and as far as there is no problem with the Action Script code in it it should be handled by Flash as a regular .as with external code... You can do this in the .htaccess file for example, with a statement similar to this, that adds the .as extension to the PHP5 handler:

AddHandler x-httpd-php5 .as

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM