Copy link to clipboard
Copied
With adobe air sdk 31 scroller is not working. You have to touch the scroll bar to scroll up and down. Will this be fixed?
Copy link to clipboard
Copied
Hi,
Can you please share your sample application/code where the issue is reproducible so that we can investigate further.
Thanks,
Amit Baliyan | Adobe AIR Engineering
Copy link to clipboard
Copied
Hi, i met the same problem many years ago when develope AIR application by html+js on windows desktop.
Copy link to clipboard
Copied
And how did you solve it?
Copy link to clipboard
Copied
not solve, need mouse click, can't scroll by wheel.
Copy link to clipboard
Copied
Hi, sorry for the late reply. The problem exists with the itemrenderer. It apperars a scrollbar at right side. only when touching the top or the bottom of the scrollbar it is possible to scroll.
<?xml version="1.0" encoding="utf-8"?>
<!--<s:IconItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" messageFunction="messageF" styleName="IconItemRenderer" iconFunction="iconF" labelFunction="labelF" iconWidth="100" iconHeight="75" >-->
<s:IconItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" styleName="IconItemRenderer" iconFunction="iconF" labelFunction="labelF" iconWidth="100" iconHeight="75" color="#5a5a5a" >
<!-- messageFunction="messageF" -->
<fx:Script>
<![CDATA[
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Matrix;
//
[Embed(source="assets/icon-noise.png")]
public var defaultImg:Class;
//*/
[Embed(source="assets/icon-videorecord.png")]
public var videoImg:Class;
[Embed(source="assets/arrow-detail-report.png")]
public var decoClass:Class;
/*[Embed(source="assets/button-background.png")]
public var backCls:Class;
[Embed(source="assets/button-background-active.png")]
public var backActiveCls:Class;*/
protected function labelF(obj:Object):String{
//if(obj.name != "snapshot2"){
var output : String = obj.name+"\n"+obj.time;
//}
//return obj.name+"\n"+obj.time
return output;
}
protected function messageF(obj:Object):String{
//return obj.time+" "+obj.description;
return obj.description;
}
protected function timeF(obj:Object):String{
//if(obj.name != "snapshot2"){
var output : String = obj.time;
//}
//return obj.time
return output;
}
protected function newIconHeight():Number {
var faktor:Number;
if(stage){
if(GLOB.getIstablet(stage) || (stage.stageWidth > stage.stageHeight && !GLOB.isDesktop)){
faktor = 1.2;
}else{
faktor = 1;
}
}
return faktor;
}
protected function iconF(obj:Object):Object{
var ret:Object;
if(obj.storage[0].item.length()>0 ){
if(obj.storage[0].item[0].content[0].indexOf("video") != 0){
ret = Service.GLOBAL_PATH+"/storage"+obj.storage.item[0].path[0];
iconWidth = 100 * newIconHeight();
iconHeight = 75 * newIconHeight();
}else {
ret = videoImg;
iconWidth = 100 * newIconHeight();
iconHeight = 75 * newIconHeight();
}
}
//
else{
ret = defaultImg;
iconWidth = 100 * newIconHeight();
iconHeight = 75 * newIconHeight();//was 45
}
//*/
//trace("iconF: "+ret);
callLater(laterDeco,[obj]);
return ret;
}
private function laterDeco(obj:Object):void{
decorator = decof(obj);
}
private function decof(obj:Object):Object
{
//trace("decof: "+obj);
if(obj.storage[0].item.length()>0){
return decoClass;
}else{
return null;
}
}
override protected function drawBackground(unscaledWidth:Number,unscaledHeight:Number):void{
var backBmp:BitmapData;
/*if (down||selected||hovered)
{
backBmp = (new backActiveCls() as Bitmap).bitmapData;
}else{
backBmp = (new backCls() as Bitmap).bitmapData;
}*/
backBmp = (new videoImg() as Bitmap).bitmapData;
// draw backgroundColor
// the reason why we draw it in the case of drawBackground == 0 is for
// mouse hit testing purposes
graphics.clear();
var m:Matrix = new Matrix();
//m.rotate(Math.PI);
var scx:Number = unscaledHeight/backBmp.height;
m.scale(scx,scx);
//graphics.beginBitmapFill(backBmp,m);
if (down||selected||hovered)
{
graphics.beginFill(0xffffff,0);//0.5
}else{
graphics.beginFill(0xffffff,0);
}
graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
graphics.endFill();
graphics.lineStyle(2,0xb0afaf);
graphics.moveTo(0,unscaledHeight-2);
graphics.lineTo(unscaledWidth,unscaledHeight-2);
// Draw the separator for the item renderer
//drawBorder(unscaledWidth, unscaledHeight);
//opaqueBackground = opaqueBackgroundColor;
}
]]>
</fx:Script>
</s:IconItemRenderer>
Copy link to clipboard
Copied
We call the itemrenderer at a mxml file with <s:List ... />
Copy link to clipboard
Copied
Hi,
Please share working sample project in zip file via any content sharing tool as the code shared by you isn’t complete and we are failing to compile it or log a bug at https://tracker.adobe.com/ and upload your working project there.
Thanks,
Amit Baliyan | Adobe AIR Engineering
Copy link to clipboard
Copied
Hi, this is a very complex code and I need to send the whole app for this. The itemrenderer receives the informations from an xml file on our server. Please understand, that I can´t send this code. Fact is that the <s:List itemRenderer="com.myapp.ActivitiesRenderer" /> is only scrolling if you touch the scrollbar. If you touch the screen the List is not scrolling anymore since Air 31.
With AIR 30 the scrollbar did not appear and the behaviour was normal. I hope you may fix this, bcs it is a bug.
Copy link to clipboard
Copied
Fixed the problem. Thanks for your advice... Just to add interactionMode = "touch"
Copy link to clipboard
Copied
how in html+js ?
Copy link to clipboard
Copied
This is the script. The scrollBar appears and it is not possible to scroll. only by using the scrollbar
<s:List includeIn="State1" contentBackgroundAlpha="0" id="lst" width="100%" height="100%" click="lst_clickHandler(event)" itemRenderer="ActivitiesItemRenderer" >