AbilityList.as

Summary
AbilityList.as
Variables
FriendlyNameCode for all the logic in the AbilityList
m_Spells
m_NumSpells
m_AbilityHeight
m_AbilityWidth
m_AbilityListOpenDValue
m_PassiveListOpenDValue
s_ResolutionScaleMonitor
Functions
onLoad
onResizelistener for stage resize
openAbilityListButton click handler for opening and closing the AbilityList
openPassiveList
SlotAbilityListOpenValueChanged
SlotPassiveListOpenValueChangedwhen the passive list is opened or closed, hide and show the Abilities tab
SlotReslolutionValueChangedOn changes to the resolution, update this.
OnSignalSpellUpdate
PopulateMenuPopulate s the menu
CreateScrollbarmethod that creates the scrollbar this fires upon changes to the resolution and the screen size
OnScrollbarUpdatewhen interacting with the scrollbar
CreateSingleSpellCreates a new icon from the spell object by attaching the icon button and then load the correct icon graphics onto it
RemoveScrollBarposition
CloseMenuFires when the abilitymenu is closed
SetupDragClipCreates the icon that will be dragged when equipping an ability
OnDragEndload the icon on to the newly created icon background
onUnload

Variables

FriendlyName

var FriendlyName: String

Code for all the logic in the AbilityList

m_Spells

var m_Spells: Array

m_NumSpells

var m_NumSpells: Number

m_AbilityHeight

var m_AbilityHeight: Number

m_AbilityWidth

var m_AbilityWidth: Number

m_AbilityListOpenDValue

var m_AbilityListOpenDValue: DistributedValue

m_PassiveListOpenDValue

var m_PassiveListOpenDValue: DistributedValue

s_ResolutionScaleMonitor

var s_ResolutionScaleMonitor: DistributedValue

Functions

onLoad

function onLoad()

onResize

function onResize(visibleRect: Rectangle)

listener for stage resize

openAbilityList

function openAbilityList() : Void

Button click handler for opening and closing the AbilityList

openPassiveList

function openPassiveList(e: Object)

SlotAbilityListOpenValueChanged

function SlotAbilityListOpenValueChanged(value: DistributedValue)

SlotPassiveListOpenValueChanged

function SlotPassiveListOpenValueChanged(value: DistributedValue) : Void

when the passive list is opened or closed, hide and show the Abilities tab

SlotReslolutionValueChanged

function SlotReslolutionValueChanged(value: DistributedValue) : Void

On changes to the resolution, update this.

OnSignalSpellUpdate

function OnSignalSpellUpdate()

PopulateMenu

function PopulateMenu()

Populate s the menu

CreateScrollbar

function CreateScrollbar()

method that creates the scrollbar this fires upon changes to the resolution and the screen size

OnScrollbarUpdate

function OnScrollbarUpdate(event: Object)

when interacting with the scrollbar

CreateSingleSpell

function CreateSingleSpell(i: Number,
spellObj: com.GameInterface.SpellData) : MovieClip

Creates a new icon from the spell object by attaching the icon button and then load the correct icon graphics onto it

Parameters

i:Number index in the m_SpellArray where the spellobject is retrieved

Returns

mainClip:MovieClip - the newly created clip

RemoveScrollBar

function RemoveScrollBar()

position

CloseMenu

function CloseMenu( ) : Void

Fires when the abilitymenu is closed

SetupDragClip

function SetupDragClip(clip: MovieClip) : MovieClip

Creates the icon that will be dragged when equipping an ability

Parameters

clip:MovieClip - the clip to duplicate and

Returns

MovieClip - a new movieclip identical to the icon selected for dragging

OnDragEnd

function OnDragEnd(event: Object)

load the icon on to the newly created icon background

onUnload

function onUnload()
var FriendlyName: String
Code for all the logic in the AbilityList
var m_Spells: Array
var m_NumSpells: Number
var m_AbilityHeight: Number
var m_AbilityWidth: Number
var m_AbilityListOpenDValue: DistributedValue
var m_PassiveListOpenDValue: DistributedValue
var s_ResolutionScaleMonitor: DistributedValue
function onLoad()
function onResize(visibleRect: Rectangle)
listener for stage resize
function openAbilityList() : Void
Button click handler for opening and closing the AbilityList
function openPassiveList(e: Object)
function SlotAbilityListOpenValueChanged(value: DistributedValue)
function SlotPassiveListOpenValueChanged(value: DistributedValue) : Void
when the passive list is opened or closed, hide and show the Abilities tab
function SlotReslolutionValueChanged(value: DistributedValue) : Void
On changes to the resolution, update this.
function OnSignalSpellUpdate()
function PopulateMenu()
Populate s the menu
function CreateScrollbar()
method that creates the scrollbar this fires upon changes to the resolution and the screen size
function OnScrollbarUpdate(event: Object)
when interacting with the scrollbar
function CreateSingleSpell(i: Number,
spellObj: com.GameInterface.SpellData) : MovieClip
Creates a new icon from the spell object by attaching the icon button and then load the correct icon graphics onto it
function RemoveScrollBar()
position
function CloseMenu( ) : Void
Fires when the abilitymenu is closed
function SetupDragClip(clip: MovieClip) : MovieClip
Creates the icon that will be dragged when equipping an ability
function OnDragEnd(event: Object)
load the icon on to the newly created icon background
function onUnload()
Close