Archive for November, 2011

RatingsBar

Friday, November 11th, 2011

On a recent project I was working on, another team required a ratings bar so I thought I put something together. It works very much like a Flex 4 List, but all item renderers at an index below the selectedIndex are selected. It also enables you to drag on the bar once you have click on it to change the rating given (mainly implemented for touch devices).

As with most (vote & vote please) spark components you can change the layout, renderer, skin etc.

For ease of use there is also a numRatings property that internally creates an ArrayList with the correct length to be used as a dataProvider for the component, although if required (i.e. you want custom labels etc to be shown) you can set you own dataProvider.


(right click for source).

The source can be downloaded only from our GitHub repository (only added to the Flex 4.5 lib at the moment). I’ll get it into the 4 lib and up on our Google Code repository soon.

  • ws.tink.spark.controls.RatingsBar (4.5)
  • ws.tink.spark.itemRenderers.RatingsBarItemRenderer (4.5)
  • ws.tink.spark.skins,controls.RatingsBarSkin (4.5)
  • London Flash Platform User Group November 2011

    Thursday, November 10th, 2011

    Massive thanks to both Tom Underhill and Shaun Smith for their sessions last month. The videos and presentations from both sessions can be found in the presentations section.

    First up at our last meeting of 2011 is Shaun Pearce with ‘Cloud Computing – An Introduction to Amazon Web Services‘ and following him we welcome back Liam Flynn with a session on ‘Animating HTML5‘.

    London Flash Platform User Group 24th November 2011 (24/11/2011).

    Sponsored by Apress & hosted by Tag.

    IsoscelesTriangle Primitive

    Tuesday, November 8th, 2011

    Here’s a Flex 4+ IsoscelesTriangle primitive. If you require an equilateral triangle you can just set width or height (not both) and the primitive will calculate the other size.


    (right click for source).

    The source can be downloaded only from our GitHub repository (only added to the Flex 4.5 lib at the moment). I’ll get it into the 4 lib and up on our Google Code repository soon.

  • ws.tink.graphics.utils.IsoscelesTriangleUtil
  • ws.tink.spark.primitives.IsoscelesTriangle (4.5)
  • Annulus Primitive

    Monday, November 7th, 2011

    Here’s a Flex 4+ Annulus primitive. You can specify the width and height (width, height), the hole width and hole height (holeWidth, holeHeight) and the amount the position of the hole should be offset from the center (holeOffsetX, holeOffsetY).


    (right click for source).

    The source can be downloaded only from our GitHub repository (only added to the Flex 4.5 lib at the moment). I’ll get it into the 4 lib and up on our Google Code repository soon.

  • ws.tink.spark.primitives.Annulus (4.5)
  • EllipticalPolygon Primitive

    Friday, November 4th, 2011

    Here’s a Flex 4+ EllipticalPolygon primitive. You can specify the width and height of the ellipse that the polygon will be drawn around (width, height) and number of sides (numSides).


    (right click for source).

    The source can be downloaded only from our GitHub repository (only added to the Flex 4.5 lib at the moment). I’ll get it into the 4 lib and up on our Google Code repository soon.

  • ws.tink.graphics.utils.EllipticalPolygonUtil
  • ws.tink.spark.primitives.EllipticalPolygon (4.5)
  • Star Primitive

    Thursday, November 3rd, 2011

    Here’s a Flex 4 Star primitive that is drawn based on outer and inner ellipses. You can specify the width and height of the outer ellipse (width, height), the width and height of the inner ellipse (innerWidth, innerHeight) and the number of points (numPoints).


    (right click for source).

    The source can be downloaded only from our GitHub repository (only added to the Flex 4.5 lib at the moment). I’ll get it into the 4 lib and up on our Google Code repository soon.

  • ws.tink.graphics.utils.StarUtil
  • ws.tink.spark.primitives.Star (4.5)