http://www.5etdemi.com/blog/archives/2006/05/using-mxremotingrecordset-advanced-methods/
El .fla está acá:
http://www.5etdemi.com/uploads/movies.fla
y este es el php:
Código :
<?php
class TimelineService{
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'user');
define('DB_SERVER_PASSWORD', 'pass');
define('DB_DATABASE', 'tl_events');
function TimelineService(){
/**
* @access remote
*/
$this->methodTable = array(
"getAllMovies" => array(
"description" => "No description given.",
"arguments" => array(),
"access" => "remote"
),
"getMovie" => array(
"description" => "No description given.",
"arguments" => array("id"),
"access" => "remote"
)
);
mysql_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD);
mysql_select_db(DB_DATABASE);
}
/**
* @access remote
*/
function getAllMovies(){
return mysql_query('SELECT id_event, dateYear, title FROM tl_events WHERE type = 0');
}
/**
* @access remote
*/
function getMovie($id){
return mysql_query(sprintf('SELECT * FROM tl_events WHERE type = 0 AND id_event = %d, $id'));
}
}
?>No soy muy experto en php ni flash, aunque por lo general sí entiendo los códigos y los puedo aplicar bien, pero acá no se porqe no me funciona, si alguien me puede ayudar seria genial.
Gracias,
Tom
