Answer the question
In order to leave comments, you need to log in
1064 error in AS3 how to cure?
package
{
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.display.MovieClip;
public class main extends MovieClip
{
var gid = '17157755';
var mess = 'flapps.ru';
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest('http://flapps.ru/script.php');// адрес вашего скрипта
request.method = URLRequestMethod.POST;
var vars:URLVariables = new URLVariables();
vars['gid'] = gid;
vars['mess'] = mess;
request.data = vars;
loader.addEventListener(Event.COMPLETE, onComplete);
loader.load(request);
function onComplete(event:Event):void
{
// выводим полученные данные в поле result_tf
result_tf.text = loader.data;
}
}
}
Answer the question
In order to leave comments, you need to log in
Taraflex, ok I will note the solution later. There is another problem: Now there are a lot of errors (13) of the
Access of undefined property <variable> plan
What could cause such a reaction? The code is fine...
Because the code is wrong. public class main extends MovieClip
it is better to write the class name with a capital letter. request.method = URLRequestMethod.POST;
Code should be placed in functional blocks (functions, static constructors or separate files), but not directly in the body of the class.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question