Skip to main content
App runner KG
Known Participant
September 20, 2018
Question

Adobe Air 31 Scroller not working

  • September 20, 2018
  • 3 replies
  • 1561 views

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?

This topic has been closed for replies.

3 replies

App runner KG
Known Participant
October 1, 2018

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" >

App runner KG
Known Participant
September 26, 2018

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>

App runner KG
Known Participant
October 1, 2018

We call the itemrenderer at a mxml file with <s:List ... />

Participating Frequently
September 21, 2018

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

Participating Frequently
October 8, 2018

Hi, i met the same problem many years ago when develope AIR application by html+js on windows desktop.

App runner KG
Known Participant
October 11, 2018

And how did you solve it?