Actionscript 3 将Actionscript 3转换为Actionscript 2
我无法将AS3转换为AS2 这是我的AS3代码Actionscript 3 将Actionscript 3转换为Actionscript 2,actionscript-3,flash,Actionscript 3,Flash,我无法将AS3转换为AS2 这是我的AS3代码 submit.addEventListener("mouseDown", sendData); function sendData(evt:Event) { //for those using PHP var students:URLRequest = new URLRequest("http://localhost/phpflash/new_student.php"); students.method = URLRequestMethod.
submit.addEventListener("mouseDown", sendData);
function sendData(evt:Event)
{
//for those using PHP
var students:URLRequest = new URLRequest("http://localhost/phpflash/new_student.php");
students.method = URLRequestMethod.POST;
var posts:URLVariables = new URLVariables();
posts.Fullname = Fullname.text;
students.data = posts;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.load(students);
}
就像@VC.One所说的,你必须学习
AS3
,AS2
被删除,实际上Flash CC不支持它
我不在AS2编码,因为很多很多年了。因此,此代码可能包含一些错误:
submit.onMouseDown = sendData;
function sendData():Void
{
var vars:LoadVars = new LoadVars();
vars.Fullname = Fullname.text;
var target:Object = new Object();
target.onLoad = function(){
trace("vars sended");
}
vars.sendAndLoad("http://localhost/phpflash/new_student.php", target, "POST");
}
“我有一个问题”,因为您没有显示任何转换为as2的尝试,我猜您的“问题”是您希望有人为您做这件事。我无法在“function sendData(evt:Event)”和“var students:URLRequest=new URLRequest”以及“students.method=URLRequestMethod.POST;”部分进行转换
evt:Event
用于鼠标点击事件,因此这里您可以使用AS2版本的函数来处理鼠标点击URLRequest
类似于filepath=
是您的其他问题。而…Method.POST
就像你说(filepath+“editmorfologi.php”,variasi,“POST”)时在其他问题中使用的“POST”代码>。2015年,你为什么还要使用AS2代码?我建议尽可能多地学习AS3(更多选项)…您好@VC。您能帮我一个忙吗