Feathers Extension PinchingControl 1.0.1


The pinching control that allows a pinch to zoom mechanic using the multitouch inputs of a mobile device.

Download project, swc, and samples on GitHub

Documentation





To compile this sample download the Feathers SDK (Manager)

Main.mxml

<f:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
  xmlns:f="library://ns.feathersui.com/mxml"
  theme="feathers.themes.MetalWorksMobileTheme"
  creationComplete="creationCompleteHandler(event)"
  xmlns:components="feathers.extensions.zoomable.*">
  <fx:Script>
    <![CDATA[
          import flash.display.Bitmap;
          import starling.display.Image;
         
          [Embed(source="./spritesheet/images/mediumIcons.png")]
          private const close_imageSpriteSheet:Class;
          [Embed(source="./spritesheet/images/mediumIcons.xml", mimeType="application/octet-stream")]
          private const close_atlas:Class;
          private var xml:XML = XML(new close_atlas());
          private var bitmap:Bitmap = new close_imageSpriteSheet;
          private var texture:Texture = Texture.fromBitmap(bitmap, false, false, 0.2);
          private var textureAtlas:TextureAtlas = new TextureAtlas(texture, xml);
          private var folderTexture:Texture = textureAtlas.getTexture("folder-icon0000");
   
          private function creationCompleteHandler( event:Event ):void
          {
            image.source = folderTexture;
          }
    ]]>
  </fx:Script>
  <components:PinchingControl id="pinchingControl" isCentered="true" width="250" height="250">
    <components:layout>
          <f:VerticalLayout/>
    </components:layout>
   
    <f:ImageLoader id="image"/>
  </components:PinchingControl>
</f:Application>
 

0 comment

Name :


Email (not published) :


Comment :

Allowed markup: [html]