dcsimg
A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25

Thread: Pulling data from PHP Error

  1. #21
    Senior Member
    Join Date
    May 2004
    Posts
    226
    Quote Originally Posted by Austinl View Post
    Code:
    Error opening URL 'http://www.lkmcomputers.co.uk/flash/lee_flash.php'
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://www.lkmcomputers.co.uk/flash/lee_flash.php
    	at Tests2_fla::MainTimeline/frame1()
    Do i have to export the published SWF into the server and run it server side?
    Yes, or setup crossdomain.xml.

  2. #22
    WohOoooooo zompo's Avatar
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    138
    What do you get if you do this

    Code:
    var request:URLRequest = new URLRequest("http://www.google.com");
    
    var loader:URLLoader = new URLLoader();
    loader.addEventListener(Event.COMPLETE, completeHandler);
    loader.load(request);
    
    function completeHandler(evt:Event) {
        trace("DATA : " + evt.target.data);
    }
    Last edited by zompo; 07-24-2009 at 01:09 PM.


    Try out my game http://alpha.bombwar.com - Alphakey: fkaplha

  3. #23
    Member
    Join Date
    Feb 2007
    Posts
    34
    Code:
    Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
    	at Error$/throwError()
    	at flash.net::URLVariables/decode()
    	at flash.net::URLVariables()
    	at flash.net::URLLoader/onComplete()

  4. #24
    Senior Member
    Join Date
    May 2004
    Posts
    226
    PHP Code:
    var request:URLRequest = new URLRequest("http://www.lkmcomputers.co.uk/flash/lee_flash.php");
    request.method URLRequestMethod.GET;

    var 
    loader:URLLoader = new URLLoader();
    loader.dataFormat URLLoaderDataFormat.VARIABLES;
    loader.addEventListener(Event.COMPLETEcompleteHandler);
    loader.load(request);

    function 
    completeHandler(evt:Event) {
        var 
    data:URLVariables evt.target.data as URLVariables;
        
        var 
    error data.oo_Error;
        var 
    firstname data.oo_Firstname;
        var 
    surname data.oo_Surname;
        var 
    user data.oo_User;
        var 
    bob data.oo_Bob;

        
    trace('Error = ' error);

        
    trace('Your first name is ' firstname);

        
    trace('Your surname is ' surname);

        
    trace('Username is ' user);

        
    trace('Bob ' bob);

    it's working for me, traces:
    Error = No
    Your first name is Ashley
    Your surname is Meadows
    Username is Ash
    Bob

  5. #25
    Member
    Join Date
    Feb 2007
    Posts
    34
    me too! well done v5000, thanks alot!

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center