Unserializing an xml passed from php

Hi there
I am working on a site that contains a variable called $xml that contains an xml file.
I have passed the variable to flash using

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  codebase="http://macromedia.com/cabs/swflash.cab#version=6,0,0,0"
  ID=testxml WIDTH=250 HEIGHT=250>
  <PARAM NAME=movie VALUE="txml.swf">
  <PARAM NAME=FlashVars VALUE="txml=<?php echo (urlencode(utf8_encode(serialize($xml))));?>"
  <PARAM NAME=quality VALUE=medium>
  <PARAM NAME=bgcolor VALUE=#99CC33>
  <EMBED src="txml.swf" FlashVars="txml=<?php echo (urlencode(utf8_encode(serialize($xml))));?>"
    bgcolor=#99CC33 WIDTH=250 HEIGHT=250
    TYPE="application/x-shockwave-flash">
  </EMBED>
</OBJECT>

Now I am having a problem getting the data back into an array in flash.
I have been trying to use the serializer class though I have never used it before and I am not getting the result I want.
This is the Action Script I have tried using to retrieve and unserialize the array though it is not working:

import SerializerClass
newdata = new Serializer().unserialize(this.txml);

If anyone has experience in using the serializer class or has any idea why my code isn’t working your help or tips would be greatly appreciated!!!