Error with URLLOADER

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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:...
    4. 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...
    5. 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...
  3. #2

    Default 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

  4. #3

    Default 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

  5. #4

    Default Re: Error with URLLOADER

    up
    dam85 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139