Bonjour à tous,
J'ai créé un itemrenderer qui se présente de la maniére suivante:
Le but étant de présenter des images dans une TileList.
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98 <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" verticalScrollPolicy="off" horizontalScrollPolicy="off" width="120" height="150" backgroundAlpha="1" backgroundColor="#0B6244" xmlns:s="library://ns.adobe.com/flex/spark" creationComplete="onEvent()" cornerRadius="11" contentBackgroundColor="#0B6244"> <mx:Script> <![CDATA[ import mx.controls.Image; import mx.core.UIComponent; import org.osmf.utils.URL; [Bindable] [Embed(source="icon/imagerie/rotate.png")] private var rotationArrowClass:Class; private var _file:File; private var _selected:Boolean; private var _sauvBMD:BitmapData; public var wasScaled:Boolean = false; public var deleted:Boolean = false; [Bindable] public var angle:int = 0; private function onEvent():void { iconCanvas.addEventListener(MouseEvent.RIGHT_CLICK, onRightClick); iconCanvas.addEventListener(MouseEvent.DOUBLE_CLICK, onDoubleClick); } private function onDoubleClick(e:MouseEvent):void { trace ("Dans dble click") trace("url:" + iconCanvas.source.toString()); // var imgFile:File = imgFile.url as File; // imgFile.openWithDefaultApplication(); } private function rotationImage(e:MouseEvent):void { rotate.end(); angle += 90; rotate.play(); } public function set image(im:BitmapData):void { this._sauvBMD=im; } public function get image() :BitmapData { return this._sauvBMD; } private function onRightClick(e:MouseEvent):void { var menu:NativeMenu = new NativeMenu(); // Set up copy. All files can be copied in all circumstances. var copy:NativeMenuItem = new NativeMenuItem("Copier"); //copy.addEventListener(Event.SELECT, copyFiles); menu.addItem(copy); // Preview var preview:NativeMenuItem = new NativeMenuItem("Visualiser"); menu.addItem(preview); } ]]> </mx:Script> <!--blurX et blurY valeur par défaut = 4--> <s:Rotate id="rotate" angleFrom="{angle-90}" angleTo="{angle}" target="{iconCanvas}" autoCenterTransform="true"/> <mx:Image id="iconCanvas" width="110" height="110" source="{data.imURL}" verticalAlign="top" horizontalAlign="center" scaleContent="true" rightClick="onRightClick"/> <mx:Label text="{data.imTitre}" truncateToFit="true" textAlign="center" fontWeight="bold" bottom="3" left="3" right="3"/> <mx:SWFLoader id="rotationArrow" source="{rotationArrowClass}" height="18" width="18" x="3" y="3" visible="true" click="rotationImage(event);" alpha=".5"/> </mx:Canvas>
Lors de l'affichage de ma list, la couleur de fond et l'arrondi ne sont pas visibles.
Comment faire pour résoudre ce problème.
Merci par avance pour votre aide.
Partager