~~NOTOC~~ ====== HandleSheet ====== ---- dataentry extension ---- author_mail : lamb@lamb-mei.com lamb-mei (羊小咩) description : Use one finger touching for moving, rotating and scaling on Starling lastupdate_dt : 2013-11-20 compatible : v0.9.1 # the Starling version you tested the extension with depends : Starling , Starling-Extension-Graphics tags :scaling ,scale,move,moving,rotating ,rotate homepage_url :https://github.com/lamb-mei/HandleSheet download_url :https://github.com/lamb-mei/HandleSheet/archive/master.zip ---- ===== Overview ===== Use one finger touching to moving 、 rotating and scaling on Starling Baseed on Starling 實現單手簡單操作物件位移 、旋轉和縮放 {{:extensions:screenshot.png?200|}} Demo (http://proj.lamb-mei.com/handlesheet/) ===== Feature ===== What feature in HandleSheet: * one finger touch control button to rotating and scaling * two finger touching to rotating and scaling * finger touch moving * custom control button display * scale limit * auto bring to front * outline border thickness * outline border color * init by config ===== Depends ===== * [[https://github.com/Gamua/Starling-Framework|Starling ]] * [[https://github.com/StarlingGraphics/Starling-Extension-Graphics/|Starling-Extension-Graphics ]] ===== Usage ===== Basic var _contents:DisplayObject = new Image(_texture) var hs:HandleSheet = new HandleSheet(_contents) Set Control Button By Texture var hs:HandleSheet = new HandleSheet(_contents) hs.setCtrlButtonInitByTexture(upTexture, downTexture) Set Control Button By Factory function imgFactory():Image{ var img:Image = new Image(_texture) return img } var hs:HandleSheet = new HandleSheet(_contents) hs.setCtrlButtonInitByFactory(imgFactory) Scale limit var hs:HandleSheet = new HandleSheet(_contents) hs.minSize = 0.5 hs.maxSize = 2 Custom outline border var hs:HandleSheet = new HandleSheet(_contents) hs.thickness = 5 hs.lineColor = 0xF7BD19 Init by Config var _conf:HandleSheetConfig = new HandleSheetConfig() _conf.setCtrlButtonInitByTexture(_upTexture, _downTexture) _conf.dispatchEventBubbles = true _conf.minSize = 0.5 _conf.lineColor = 0xFF0000 //set config var hs:HandleSheet = new HandleSheet(_contents , _conf) ===== Changelog ===== * /2013/11/19 //: change package into starling.extension