Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Flash and VO  (Read 7033 times)
jfdesgagne
Newbie
*
Posts: 3


View Profile Email
« 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)
}
Logged
jfdesgagne
Newbie
*
Posts: 3


View Profile Email
« Reply #1 on: February 17, 2009, 10:39:19 »

i found the anwser by myself


http://www.flash-db.com/Tutorials/helloAS3/helloAS3.php?page=4
Logged
Pages: [1]
Print