jfdesgagne
|
 |
« on: February 16, 2009, 09:09:40 » |
|
Hi! I did a project using Flex and PureMVC multicore and i now trying one in Flash AS3. I'm trying to know how to use the VO's with amfphp and Flash. In flex, we have the meta tag RemoteClass to transform a php class into an as3 class.
How can we do it with Flash ?
I created a VO in php
class ProjectVO { var $_explicitType = "com.jfdesgagne.jfdesgagne09.modules.showcase.model.vo.ProjectVO"; var $title = ''; var $task = ''; var $eye = ''; var $address = ''; var $name = ''; var $date = ''; function __construct($title=null, $task=null, $eye=null, $address=null, $name=null, $date=null) { if (!is_null($title)) $this->title = $title; if (!is_null($task)) $this->task = $task; if (!is_null($eye)) $this->eye = $eye; if (!is_null($address)) $this->address = $address; if (!is_null($name)) $this->name = $name; if (!is_null($date)) $this->date = $date; } }
And a VO in AS3 (flash)
package com.jfdesgagne.jfdesgagne09.modules.showcase.model.vo { public class ProjectVO { public var title:String = ''; public var task:String = ''; public var eye:String = ''; public var address:String = ''; public var name:String = ''; public var date:String = '';
public function BottomMenuItemVO(title:String=null, task:String=null, eye:String=null, address:String=null, name:String=null) { if (title != null) this.title = title; if (task != null) this.task = task; if (eye != null) this.eye = eye; if (address != null) this.address = address; if (name != null) this.name = name; if (address != null) this.address = address; } } }
How should i'm supose to process in Flash to transform the php VO into flash VO in my proxy ?
private function _receiveDataHandler($project:ProjectVO):void { trace($project) }
|