Ok merci.
Au final voici mon code (moins les lignes non pertinentes).
Qu'en penses tu ?
NB : j'ai du importer mx.controls.* pour pouvoir importer flash.filesystem.File
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:filters="flash.filters.*" xmlns:rs="com.rubenswieringa.book.*" layout="absolute" backgroundColor="#000000" applicationComplete="init(event)"> <mx:Style source="assets/style/book.css" /> <mx:Script> <![CDATA[ //import mx.accessibility.*; import mx.controls.FileSystemList; import flash.net.*; import flash.utils.*; import mx.controls.*; import flash.filesystem.*; // PICTURE LIST FROM USER FOLDER [Bindable] public var sommaire:Array = File.documentsDirectory.getDirectoryListing(); // END PICTURES ]]> </mx:Script> <!-- BOOK STARTS HERE --> <rs:Book id="myBook" x="{Math.round(Application.application.width/2-512)}" y="0" width="1024" height="768" openAt="0" autoFlipDuration="600" easing="0.7" regionSize="400" sideFlip="true" hardCover="false" hover="false" snap="false" flipOnClick="false"> <!-- DYNAMIC PAGING --> <mx:Repeater id="myReliure" dataProvider="{sommaire}"> <rs:Page> <mx:Image source="{myReliure.currentItem}" width="512" height="768" /> </rs:Page> </mx:Repeater> </rs:Book> <!-- BOOK ENDS HERE --> </mx:Application>
NB2 : avec FlashPlayer v 9.0.124 j'ai un "écran noir", avec la v.9.0.115 j'ai un message d'erreur sur flash.filesystem.File introuvable....
Partager