Packagecom.gestureworks.cml.elements
Classpublic class Flickr
InheritanceFlickr Inheritance Image Inheritance TouchContainer Inheritance com.gestureworks.core.TouchSprite

The Flick element provides access to images stored on Flickr through the Flickr API. To access the image, one must have the image's ID from the flickr server, and a Flickr API Key. Flickr API keys start out at free and have some subscription plans depending on the amount of use they receive. They are available at: http://www.flickr/com/service/api
     
       var flickrImg:Flickr = new Flickr();
        flickrImg.apikey = "ENTER YOUR FLICKR API KEY";
        flickrImg.src = "5703998760";
        addChild(flickrImg);
        
        //Call init() once you're ready to display the class.
        flickrImg.init();
     
     

See also

YouTube


Public Properties
 PropertyDefined By
  apikey : String
The user's API key, necessary for making queries to the API, but not necessary for single images.
Flickr
 InheritedaspectRatio : Number
[read-only] Stores the aspectRatio of the currently loaded image
Image
 InheritedautoShuffle : Boolean
autoshuffles
TouchContainer
 Inheritedavatar : Boolean
sets the avatar value
Image
 Inheritedbitmap : Bitmap
Stores a reference to the currently loaded bitmap
Image
 InheritedbitmapArray : Array
[read-only] stores images in an array
Image
 InheritedbitmapData : BitmapData
Stores a reference to the currently loaded bitmapData
Image
 InheritedbitmapDataArray : Array
[read-only] stores bitmap data array
Image
 InheritedbitmapDataCache : Boolean
Specifies whether the bitmapData is cached or not
Image
 InheritedchildList : ChildList
Returns the object's childList.
TouchContainer
 InheritedclassName : String
sets the class name of displayobject
TouchContainer
 InheritedcloneExclusions : Vector.<String>
[read-only] Returns a list of properties to exclude when cloning this object
TouchContainer
 InheritedcmlIndex : int
Returns the index created by the CML parser.
TouchContainer
  description : String
[read-only]
Flickr
 InheriteddimensionsTo : Object
Sets the dimensions of TouchContainer to given object
TouchContainer
 InheriteddropShadow : Boolean
Sets the drop shadow effect
TouchContainer
 InheritedfileData : Bitmap
Image
 Inheritedgroup : String
TouchContainer
 Inheritedheight : Number
[override] Sets width of the display object in pixels
Image
 InheritedheightPercent : Number
sets the height of the container
TouchContainer
 Inheritedid : String
Returns the object's id.
TouchContainer
 Inheritedimg : ImageLoader
Image
 InheritedisLoaded : Boolean = false
Image
 Inheritedlandscape : Boolean
[read-only] specifies whether the loaded image is landscape or not
Image
 Inheritedlayout : *
specifies the type of layout
TouchContainer
 InheritedlayoutList : Dictionary
TouchContainer
  loaded : String
[read-only] Read-only property indicating if the element is loaded or not.
Flickr
 InheritedmouseChildren : Boolean
[override] sets the mousechildren value to true or false.
TouchContainer
 Inheritednormalize : Boolean
specifies whether loaded image is normalised or not
Image
 InheritedpaddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area.
TouchContainer
 InheritedpaddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area.
TouchContainer
 InheritedpaddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area.
TouchContainer
 InheritedpaddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area.
TouchContainer
 InheritedpercentLoaded : Number
Image
 Inheritedportrait : Boolean
[read-only] specifies whether the loaded image is portrait or not
Image
 Inheritedposition : *
Sets the position
TouchContainer
 InheritedrelativeX : Boolean
When set true this containers children's x position will be laid out relatively to each other.
TouchContainer
 InheritedrelativeY : Boolean
When set true this containers children's y position will be laid out relatively to each other.
TouchContainer
 Inheritedresample : Boolean
Specifies whether a loaded image is resampled to the provided width and/or height.
Image
 InheritedsizeArray : Array
stores array list size
Image
 Inheritedsound : String
TouchContainer
  src : String
[override] A string for the image id.
Flickr
 Inheritedstate : Dictionary
TouchContainer
 InheritedstateId : *
Returns the current state id.
TouchContainer
 InheritedtoBitmap : Boolean
TouchContainer
  url : String
A string for the image url.
Flickr
 Inheritedwidth : Number
[override] Sets width of the display object in pixels
Image
 InheritedwidthPercent : Number
sets the width of the container
TouchContainer
Protected Properties
 PropertyDefined By
 Inherited_bitmapDataArray : Array
Image
 InheritedcmlGestureList : Object
TouchContainer
Public Methods
 MethodDefined By
  
Constructor
Flickr
 Inherited
TouchContainer
 Inherited
method searches the child and adds to the list
TouchContainer
 Inherited
addChild(child:DisplayObject):DisplayObject
[override] Adds child to display list and, if not already added, the child list
TouchContainer
 Inherited
addChildAt(child:DisplayObject, index:int):DisplayObject
[override] Adds child to display list and, if not already added, the child list
TouchContainer
 Inherited
applyLayout(value:* = null):void
Apply the containers layout
TouchContainer
 Inherited
childToList(id:String, child:*):void
child appended to the childlist
TouchContainer
 Inherited
clone():*
[override] Returns a clone of this Image
Image
 Inherited
close():void
Closes the currently open image file
Image
  
dispose():void
[override]
Flickr
 Inherited
getElementById(id:String):*
Searches CML childList by id.
TouchContainer
 Inherited
getElementsByClassName(className:String):Array
Searches the CML childList by className.
TouchContainer
 Inherited
getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class.
TouchContainer
  
init():void
[override] Initialisation method
Flickr
 Inherited
loadComplete(event:Event = null):void
This is called when the image is loaded.
Image
 Inherited
loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number.
TouchContainer
 Inherited
makeGestureList(value:XMLList):Object
Creates gestureList object from XML
TouchContainer
  
open(file:String = null):void
[override]
Flickr
 Inherited
parseCML(cml:XMLList):XMLList
Parse cml for local layouts.
TouchContainer
 Inherited
postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine.
TouchContainer
 Inherited
querySelector(selector:String):*
Searches the CML childList by selector.
TouchContainer
 Inherited
querySelectorAll(selector:*):Array
Search the CML childList by selector.
TouchContainer
 Inherited
removeChild(child:DisplayObject):DisplayObject
[override] Removes child from display list and, if not already removed, the child list
TouchContainer
 Inherited
removeChildAt(index:int):DisplayObject
[override] Removes child from display list and, if not already removed, the child list
TouchContainer
 Inherited
removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void
[override] Removes children from display list and, if not already removed, the child list
TouchContainer
 Inherited
resize():void
Image
 Inherited
saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number.
TouchContainer
 Inherited
searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists.
TouchContainer
 Inherited
method sets the dimensions of each child
TouchContainer
 Inherited
tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index.
TouchContainer
 Inherited
Updates child padding within this container
TouchContainer
 Inherited
Updates child percent dimensions within this container
TouchContainer
 Inherited
updateProperties(state:* = 0):void
Updates properties from state.
TouchContainer
 Inherited
Updates child relative positions within this container
TouchContainer
Protected Methods
 MethodDefined By
 Inherited
Image
 Inherited
onPercentLoad(event:LoaderEvent):void
Image
Property Detail
apikeyproperty
apikey:String

The user's API key, necessary for making queries to the API, but not necessary for single images.


Implementation
    public function get apikey():String
    public function set apikey(value:String):void
descriptionproperty 
description:String  [read-only]


Implementation
    public function get description():String
loadedproperty 
loaded:String  [read-only]

Read-only property indicating if the element is loaded or not.


Implementation
    public function get loaded():String
srcproperty 
src:String[override]

A string for the image id.


Implementation
    public function get src():String
    public function set src(value:String):void
urlproperty 
url:String

A string for the image url.


Implementation
    public function get url():String
    public function set url(value:String):void
Constructor Detail
Flickr()Constructor
public function Flickr()

Constructor

Method Detail
dispose()method
override public function dispose():void

init()method 
override public function init():void

Initialisation method

open()method 
override public function open(file:String = null):void

Parameters

file:String (default = null)