\r
public static function testAS()\r
{\r
- $obj = new stdClass();\r
- $obj->blabla = 'Blabla';\r
- $obj->truc = 'Machin';\r
- $flex = new cubeFlexCompiler('FluidbookDatas', 'flash.display.Sprite');\r
- $flex->addVariable('testString', 'Blabla blabla' , true);\r
- $flex->addVariable('testBoolean', false , true);\r
- $flex->addBitmap('blabla.jpg');\r
- $flex->addSWF('blabla.swf');\r
- $flex->addVariable('testObject',$obj,true);\r
+ global $core;\r
+ $dao = new wsDAOBook($core->con);\r
+ $book = $dao->selectById(2963);\r
+ $pages = $dao->getPagesOfBook(2963);\r
+\r
+ $daoTheme = new wsDAOTheme($core->con);\r
+ $theme = $daoTheme->getThemeOfBook(2963);\r
+\r
+ $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'));\r
+ $flex->addVariable('links', $book->links);\r
+ $flex->addVariable('datas', $book->parametres);\r
+ $flex->addVariable('traductions', $book->traductions);\r
+ $flex->addVariable('chapters', $book->chapters);\r
+ $flex->addVariable('extras', $book->extras);\r
+ $flex->addVariable('numerotation', $book->numerotation);\r
+ $flex->addVariable('theme', $theme->parametres);\r
+ $flex->addVariable('pages', count($pages));\r
+ foreach($pages as $i => $infos) {\r
+ $flex->addBitmap(ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.jpg', 'thumb' . $i);\r
+ }\r
\r
ob_clean();\r
$flex->compile();\r