[英]Replacing some string in an SWF/FLASH file using PHP
I have some flash swf files where i hard coded some variables to use with action script like p='mydomain.com' 我有一些Flash SWF文件,在其中我对一些变量进行了硬编码以与动作脚本一起使用,例如p ='mydomain.com'
I want to replace the value of mydomain.com with a given string using a php script . 我想使用php脚本用给定的字符串替换mydomain.com的值。 I know this can be done using Binary operation, but it failed for me .
我知道可以使用Binary操作来完成此操作,但对我而言却失败了。 Can anyone help me to find a solution using php 's built in functions only (No third party language) .
谁能帮我找到仅使用php内置函数的解决方案(无第三方语言)。
Thanks 谢谢
You can have PHP pass variables to the swf file using GET variables. 您可以使用GET变量将PHP变量传递给swf文件。
http://www.kirupa.com/developer/actionscript/flash_php_mysql.htm http://www.kirupa.com/developer/actionscript/flash_php_mysql.htm
The magic line is this: 魔术线是这样的:
loadVariables("http://localhost/test.php", this, "GET");
EDIT: 编辑:
After considering the options, you may want to store strings that are likely to change in an XML file and read the values at runtime. 在考虑了选项之后,您可能希望将可能会更改的字符串存储在XML文件中,并在运行时读取值。
http://www.kirupa.com/web/xml/XMLwithFlash3.htm http://www.kirupa.com/web/xml/XMLwithFlash3.htm
http://www.kirupa.com/developer/flashcs3/using_xml_as3_pg1.htm http://www.kirupa.com/developer/flashcs3/using_xml_as3_pg1.htm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.