android - move screen over image in titanium javascript -
i need create effect in site withe name:
//i need in javascript
the problem created effect image designs. how can move trough entire image , show part of image in javascript android , ios?
i achieved using
index.xml
<alloy> <window class="container"> <label id="label" top="80" onclick="doclick">play sign</label> <view height="84"> <imageview width="255" height="7224" id="sigimage" top="0" image="/testimages/0d8zt.png"></imageview> </view> </window> </alloy>
index.tss
".container": { backgroundcolor:"white" } "label": { width: ti.ui.size, height: ti.ui.size, color: "#000" } "#label": { font: { fontsize: 18 } }
index.js
var interval = null; var i=0; function doclick(e) { clearinterval(interval); = 0; replay(); } replay(); function replay(){ interval = setinterval(function(){ if(i<86){ $.sigimage.top = -i*84; i++; ti.api.info('i = '+i); }else{ clearinterval(interval); } },10); } $.index.open();
a little trick, hope you. :)
Comments
Post a Comment