Packagecom.myflashlab.air.extensions.facebook
Classpublic class LikeBtn
InheritanceLikeBtn Inheritance flash.events.EventDispatcher

Having like buttons in your Adobe Air applications can be very fun, right? well, this class will help you just do that. To see how you can do that, see the example in FB.createLikeBtn

NOTICE: You will not be able to create a new like button by initializing this class directly. you have to use the FB.createLikeBtn method.

See also

FB.createLikeBtn()


Public Properties
 PropertyDefined By
  height : Number
[read-only] indicates the real height of the like button when it is created
LikeBtn
  isVisible : Boolean
[read-only] indicates if the button is visible or not at the moment.
LikeBtn
  name : String
Indicates the name of this button.
LikeBtn
  style : int
[read-only] indicates the current style for this button
LikeBtn
  type : int
[read-only] indicates the current url type for this button
LikeBtn
  url : String
[read-only] indicates the current url for this button
LikeBtn
  width : Number
[read-only] indicates the real width of the like button when it is created
LikeBtn
  x : int
indicates the x position of the button on your stage
LikeBtn
  y : int
indicates the y position of the button on your stage
LikeBtn
Public Methods
 MethodDefined By
  
dispose():void
use this method to remove and dispose this button but do not forget to remove the listeners you may had added yourself.
LikeBtn
  
setVisibility($value:Boolean):void
change the visibility of an button using this method.
LikeBtn
  
update($url:String, $style:int, $type:int):void
you can update the url and style of your button at runtime.
LikeBtn
Public Constants
 ConstantDefined By
  LINK_TYPE_OPEN_GRAPH : int = 1
[static]
LikeBtn
  LINK_TYPE_PAGE : int = 2
[static]
LikeBtn
  LINK_TYPE_UNKNOWN : int = 0
[static]
LikeBtn
  STYLE_BOX_COUNT : int = 2
[static]
LikeBtn
  STYLE_STANDARD : int = 0
[static]
LikeBtn
Property Detail
heightproperty
height:Number  [read-only]

indicates the real height of the like button when it is created


Implementation
    public function get height():Number
isVisibleproperty 
isVisible:Boolean  [read-only]

indicates if the button is visible or not at the moment.


Implementation
    public function get isVisible():Boolean
nameproperty 
public var name:String

Indicates the name of this button. you may use this property to identify the like button in your project. you may change this name in runtime.

styleproperty 
style:int  [read-only]

indicates the current style for this button


Implementation
    public function get style():int
typeproperty 
type:int  [read-only]

indicates the current url type for this button


Implementation
    public function get type():int
urlproperty 
url:String  [read-only]

indicates the current url for this button


Implementation
    public function get url():String
widthproperty 
width:Number  [read-only]

indicates the real width of the like button when it is created


Implementation
    public function get width():Number
xproperty 
x:int

indicates the x position of the button on your stage


Implementation
    public function get x():int
    public function set x(value:int):void
yproperty 
y:int

indicates the y position of the button on your stage


Implementation
    public function get y():int
    public function set y(value:int):void
Method Detail
dispose()method
public function dispose():void

use this method to remove and dispose this button but do not forget to remove the listeners you may had added yourself.

See also

setVisibility()method 
public function setVisibility($value:Boolean):void

change the visibility of an button using this method.

Parameters

$value:Boolean

update()method 
public function update($url:String, $style:int, $type:int):void

you can update the url and style of your button at runtime. do consider updating your buttons instead of recreating them. updating a button is very faster than recreating it.

Parameters

$url:String
 
$style:int
 
$type:int

Constant Detail
LINK_TYPE_OPEN_GRAPHConstant
public static const LINK_TYPE_OPEN_GRAPH:int = 1

LINK_TYPE_PAGEConstant 
public static const LINK_TYPE_PAGE:int = 2

LINK_TYPE_UNKNOWNConstant 
public static const LINK_TYPE_UNKNOWN:int = 0

STYLE_BOX_COUNTConstant 
public static const STYLE_BOX_COUNT:int = 2

STYLE_STANDARDConstant 
public static const STYLE_STANDARD:int = 0