加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

titleGroup

发布时间:2020-12-15 05:15:45 所属栏目:百科 来源:网络整理
导读:public function setShop():void ???{ //????shopList2.removeAllElements(); ???? //????var list:VGroup = new VGroup(); //????list.percentWidth = 100; //????list.percentHeight = 100; ????if(!shopes)return; ???? //????var scroll:Scroller = new

public function setShop():void ???{ //????shopList2.removeAllElements(); ???? //????var list:VGroup = new VGroup(); //????list.percentWidth = 100; //????list.percentHeight = 100; ????if(!shopes)return; ???? //????var scroll:Scroller = new Scroller(); //????scroll.percentWidth = 100; //????scroll.percentHeight = 100; //????scroll.setStyle("skinClass","com.wks.skins.scroller.Scroller_skin"); //????skinClass="com.wks.skins.scroller.Scroller_skin" ???? //????list.addElement(scroll); ???? //????shopList.addElement(scroll); ???? ????var titlG:TileGroup = new TileGroup(); ????titlG.percentWidth = 100; ????titlG.percentHeight = 100; ????titlG.setStyle("horizontalAlign","center"); ????titlG.orientation = TileOrientation.ROWS; ????titlG.autoLayout = true; ???? ????var slength:int = shopes.length; ????for(var i:int=0; i<slength; i++) ????{ ?????var currshop:Shop = shopes.getItemAt(i) as Shop; ?????var vb:RowComp = new RowComp(); ?????vb.rowData = currshop; ?????vb.cakeList = shopes; ?????vb.currentCakeIndex = i; ????? ?????if(vb.cakename != null) ?????{ ??????vb.setRow(); ?????} ????? ?????titlG.addElement(vb); ????} ????scroll.viewport = titlG; ???? //????shopList.addElement(titlG); ????titlG.addEventListener(ResizeEvent.RESIZE,changeSize); ???} ??? ???private function changeSize(event:ResizeEvent):void ???{ ????var currTile:TileGroup = event.currentTarget as TileGroup; ????var rowNum:int = currTile.numElements; ????if(rowNum > 0) ????{ ?????var tilewidth:Number = currTile.width; ?????var row:RowComp = currTile.getElementAt(0) as RowComp; ?????var rowwidth:Number = row.width; ????? ?????var childNum:int = tilewidth/rowwidth; ?????if(childNum > 1) ?????{ ??????currTile.horizontalGap = (tilewidth - row.width * childNum)/(childNum - 1); ?????} ????} ???}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读