帖子
帖子
用户
博客
课程
显示全部楼层
6
帖子
0
勋章
41
Y币

[App引擎] 求助:图片轮播 scrollPicture

[复制链接]
发表于 2014-11-14 10:07:04
用以下代码从未成功过示例代码:
  1. var obj = api.require('scrollPicture');
  2. var arrayPath = new Array();
  3. arrayPath[0] = 'widget://res/scrollPicture_01.jpg';
  4. arrayPath[1] = 'widget://res/scrollPicture_02.jpg';
  5. arrayPath[2] = 'http://f.hiphotos**.**/image/pic/item/4e4a20a4462309f7bdca9423710e0cf3d7cad65d.jpg';
  6. arrayPath[3] = 'widget://res/scrollPicture_04.jpg';
  7. arrayPath[4] = 'widget://res/scrollPicture_05.jpg';
  8. var arrayTitle = new Array();
  9. arrayTitle[0] = 'widget://res/scrollPicture_01.jpg';
  10. arrayTitle[1] = 'widget://res/scrollPicture_02.jpg';
  11. arrayTitle[2] = 'http://f.hiphotos**.**/image/pic/item/4e4a20a4462309f7bdca9423710e0cf3d7cad65d.jpg';
  12. arrayTitle[3] = 'widget://res/scrollPicture_04.jpg';
  13. arrayTitle[4] = 'widget://res/scrollPicture_05.jpg';

  14. obj.open({
  15.     placeHoldImg:'widget://res/scrollPicture_placehoder.png',
  16.     subtitle:{
  17.         titles:arrayTitle
  18.     },
  19.     control:{
  20.         position:0
  21.     }
  22. },function(ret,err){
  23.     if(ret.status){
  24.         ret.click;
  25.     }else{
  26.         ret.index;
  27.     }
  28. });
复制代码




6
帖子
0
勋章
41
Y币
求好心人给段可以用的代码
6
帖子
0
勋章
41
Y币
版主有人在不
11
帖子
0
勋章
138
Y币
示例代码有问题,你自己加个图片参数就行了
53
帖子
0
勋章
522
Y币
   function OpenScrollPic(){

            var arrayPath = new Array();
            arrayPath[0] = 'widget://res/scrollPicture_01.jpg';
            arrayPath[1] = 'widget://res/scrollPicture_02.jpg';
            arrayPath[2] = 'http://f.hiphotos**.**/image/pic/item/4e4a20a4462309f7bdca9423710e0cf3d7cad65d.jpg';
            arrayPath[3] = 'widget://res/scrollPicture_04.jpg';
            arrayPath[4] = 'widget://res/scrollPicture_05.jpg';
            var arrayTitle = new Array();
            arrayTitle[0] = 'widget://res/scrollPicture_01.jpg';
            arrayTitle[1] = 'widget://res/scrollPicture_02.jpg';
            arrayTitle[2] = 'http://f.hiphotos**.**/image/pic/item/4e4a20a4462309f7bdca9423710e0cf3d7cad65d.jpg';
            arrayTitle[3] = 'widget://res/scrollPicture_04.jpg';
            arrayTitle[4] = 'widget://res/scrollPicture_05.jpg';

            var obj = api.require('scrollPicture');
            obj.open({
                placeHoldImg:'widget://image/scrollPicture_placeholder.png',
                x:0,
                y:0,
                intervalTime:5,
                paths:arrayPath,
                fixedOn:'main-home-jp',
                control:{
                    position:0
                }
            },function(ret,err){
                if(ret.status){
                    ret.click;
                }else{
                    ret.index;
                }
            });
        }
6
帖子
0
勋章
41
Y币
毛腿 发表于 2014-11-15 01:43
function OpenScrollPic(){

            var arrayPath = new Array();

显示出来的样式太丑了,特别是字体背景那块
字体背景会在下周版本开放出接口,让开发者自定义
为什么会报cannot call method ‘open’of undefined???
40
帖子
0
勋章
6375
Y币
长发飘飘的玉哥 发表于 2014-12-16 09:39
为什么会报cannot call method ‘open’of undefined???

此次更新的bug 下个版本就好了
您需要登录后才可以回帖 登录

本版积分规则