From 1b429e6fd40a26d19ddfee9df96391e6763d42f5 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 7 Jul 2010 12:53:38 +0000 Subject: [PATCH] --- inc/ws/Controlleur/class.ws.url.php | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index b39b1c8cb..e0e3ba915 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -122,15 +122,26 @@ html{height:100%}' . "\n"; public static function testAS() { - $obj = new stdClass(); - $obj->blabla = 'Blabla'; - $obj->truc = 'Machin'; - $flex = new cubeFlexCompiler('FluidbookDatas', 'flash.display.Sprite'); - $flex->addVariable('testString', 'Blabla blabla' , true); - $flex->addVariable('testBoolean', false , true); - $flex->addBitmap('blabla.jpg'); - $flex->addSWF('blabla.swf'); - $flex->addVariable('testObject',$obj,true); + global $core; + $dao = new wsDAOBook($core->con); + $book = $dao->selectById(2963); + $pages = $dao->getPagesOfBook(2963); + + $daoTheme = new wsDAOTheme($core->con); + $theme = $daoTheme->getThemeOfBook(2963); + + $flex = new cubeFlexCompiler('FluidbookDatas', ROOT . '/books/datasCompiler/test', 'flash.display.Sprite', array('C:\Users\Vincent\Documents\Works\cubeExtranet\swf\_src', 'C:\Users\Vincent\Documents\Works\as3')); + $flex->addVariable('links', $book->links); + $flex->addVariable('datas', $book->parametres); + $flex->addVariable('traductions', $book->traductions); + $flex->addVariable('chapters', $book->chapters); + $flex->addVariable('extras', $book->extras); + $flex->addVariable('numerotation', $book->numerotation); + $flex->addVariable('theme', $theme->parametres); + $flex->addVariable('pages', count($pages)); + foreach($pages as $i => $infos) { + $flex->addBitmap(ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.jpg', 'thumb' . $i); + } ob_clean(); $flex->compile(); -- 2.39.5