Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
dam85 #1
Error with URLLOADER
i get this error:
Error: Unknown Property: 'id'. When i do:
loader.addEventListener(Event.COMPLETE, function():void {dispatchEvent(new
Event("COMPLETE"));});
Why?
Thanks for the support
package inc{
import flash.events.*;
import flash.net.*;
public class Flex2Php extends EventDispatcher{
public var loader:URLLoader = new URLLoader();
public var request:URLRequest = new URLRequest()
public function Flex2Php():void{
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, function():void {dispatchEvent(new
Event("COMPLETE"));});
}
public function connect(url:String, method:String):void{
request = new URLRequest(url);
if (method=="POST"){
request.method = URLRequestMethod.POST;
}
else{
request.method = URLRequestMethod.GET;
}
}
public function setVariables(vars:String):void{
var variables:URLVariables = new URLVariables(vars);
request.data = variables;
}
public function send():void{
loader.load(request);
}
}
}
dam85 Guest
-
Problem with URLLoader
Hello, I am trying to load an XML from a url into a variable so that I can access it in my Flex application. I have this code: var myXML:XML = new... -
URLRequest + URLLoader
How can you load a xml file using URLRequest and URLLoader? I tried to find it through the web, but there is very little documentation about this... -
Error 403 Failed to read heders Error for long-runningCFMAIL and CFINDEX command
I have two different pages with long-running scripts on which I am recieving the following error: Error - 403 Failed to read headers to server:... -
Error Creating Control: Parser Error DocHeader does not have a property named 'cc3:MyItems'
I am having problems getting this webcontrol working properly. Everything else works fine except having items. So here is the low-down on the... -
An error occurred while try to load the string resources (GetModuleHandle failed with error -2147023888)
Hello, on one of our customers servers we get following error on first ASPX-page: An error occurred while try to load the string resources... -
jylaxx #2
Re: Error with URLLOADER
I don't know if it could explain the error but you should use Event.COMPLETE or "complete" instead of "COMPLETE" in your listener handler function.
dispatchEvent( new Event( Event.COMPLETE ) ) ;
jylaxx Guest
-
dam85 #3
Re: Error with URLLOADER
the same problem
Error: Unknown Property: 'id'.
package inc{
import flash.events.*;
import flash.net.*;
public class Flex2Php extends EventDispatcher{
public var loader:URLLoader = new URLLoader();
public var request:URLRequest = new URLRequest()
public function Flex2Php():void{
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, function():void {dispatchEvent(new
Event(Event.COMPLETE));});
}
public function connect(url:String, method:String):void{
request = new URLRequest(url);
if (method=="POST"){
request.method = URLRequestMethod.POST;
}
else{
request.method = URLRequestMethod.GET;
}
}
public function setVariables(vars:String):void{
var variables:URLVariables = new URLVariables(vars);
request.data = variables;
}
public function send():void{
loader.load(request);
}
}
}
dam85 Guest
-



Reply With Quote

