Archive

Archive for November, 2008

Additional XML support in Zend Amf

November 25th, 2008

Support has been added to Zend Amf to return php objects of type DOMDocument and SimpleXML and receive an XML object in Flex ready for E4X. Note that you can already send an XML object from the flash player that results in a SimpleXML object in PHP.

Here is an example of the PHP service.

ab';
		$this->doc = new DOMDocument();
		$this->doc->preserveWhiteSpace = false;
		$this->doc->loadXML($sXML);
	}

 	public function getDom()
    {
    	return $this->doc;
    }

    public function getSimpleXml()
    {
    	$simpleXml = simplexml_import_dom($this->doc);
    	return $simpleXml;
    }
}

AMFPHP, Flash Platform, Zend_Amf

Simple RemoteObject example in Flex 4 Gumbo

November 23rd, 2008

If you just received a copy of Flex 4 Gumbo like me you may have some issues getting something simple started. The following code shows how to make a simple remoteobject call inside flex builder 4. A couple gotchas that fooled me. First notice that you have to wrap your remoteobject call inside of the new declarations tag. Second you should notice that the MX namespace has been dropped for all components. This too took me a bit! 

Check out the ScreenCast and of course the code