SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2003
    Location
    Linz/Austria
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    can't create object

    hello,

    i've a problem with WDDX. Although the beneath code works in another project without any problems, in my new project i cant create an instance of WDDX.

    if i debug the function, variable foo is "undefined" after "foo = new WDDX()" and i cant find any reason for that.

    Code:
    on (release) 
    {
    	#include "wddx_mx.as"
    	
    	XML.prototype.ignoreWhite = true;
    	myXML = new XML();
    	
    	myXML.load ("http://www.myurl.at/script.php?name=" + name + "&strasze=" + strasse + "&ort=" + ort + "&email=" + email");
    
    	myXML.onLoad = function ()
    	{
    		foo = new WDDX();
    	   	wddxObj = foo.deserialize( this ); 
    	   	   
    		for (i in wddxObj)
    		{
    			arr = wddxObj[i];
    		}
    		
    		delete (myXML);
    	}
    }
    i'd be thankful for any hint i get

    stefan

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #include does not incluse the files at runtime, it includes them when you build the swf. So wddx_mx.as is never being included since its in an on (release) handler. You should include the files you want on the first frame of the main timeline.


Bookmarks

Posting Permissions

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