Package | stencyl.api.engine |
Class | public dynamic class Script |
Inheritance | Script ![]() |
Subclasses | ActorScript, SceneScript |
Property | Defined By | ||
---|---|---|---|
BACK : int = 2 [static] | Script | ||
FRONT : int = 0 [static] | Script | ||
GET_SCORES_URL : String = http://www.stencyl.com/v10/api/score/getTopEntries/ [static] | Script | ||
GET_SCORE_URL : String = http://www.stencyl.com/v10/api/score/getForCurrentPlayer/ [static] | Script | ||
lastCreatedActor : Actor = null [static] | Script | ||
lastCreatedJoint : b2Joint = null [static] | Script | ||
lastCreatedLabel : Label = null [static] | Script | ||
lastCreatedPanel : Panel = null [static] | Script | ||
lastCreatedRegion : Region = null [static] | Script | ||
lastCreatedTerrainRegion : TerrainRegion = null [static] | Script | ||
MIDDLE : int = 1 [static] | Script | ||
mpx : Number = 0 [static] | Script | ||
mpy : Number = 0 [static] | Script | ||
mrx : Number = 0 [static] | Script | ||
mry : Number = 0 [static] | Script | ||
scene : GameState | Script | ||
SUBMIT_SCORE_URL : String = http://www.stencyl.com/v10/api/score/submit/ [static] | Script | ||
wrapper : Behavior | Script |
Method | Defined By | ||
---|---|---|---|
Internal use only. | Script | ||
abortTween(target:Object):void [static] | Script | ||
AddUnsigned(lX:*, lY:*):* | Script | ||
adjustLocationForAllSounds(time:uint, volume:Number):void | Script | ||
asBoolean(o:*):Boolean [static]
Accepts a literal boolean or String boolean. | Script | ||
bringRootPanelForward():void | Script | ||
bringRootPanelToFront():void | Script | ||
ConvertToWordArray(string:String):* | Script | ||
Creates an actor of the given type at the given location and layer. | Script | ||
createActorInNextScene(type:ActorType, x:Number, y:Number, layerConst:int):void
Creates an actor of the given type at the given location and layer when the next scene begins. | Script | ||
createBoxRegion(x:int, y:int, w:int, h:int):Region
Create a rectangular Region
| Script | ||
createBoxTerrainRegion(x:int, y:int, w:int, h:int):TerrainRegion
Create a rectangular TerrainRegion
| Script | ||
createBrightnessFilter(b:Number):ColorMatrixFilter [static] | Script | ||
createCircularRegion(x:int, y:int, r:int):Region
Create a circular Region
| Script | ||
createCircularTerrainRegion(x:int, y:int, r:int):TerrainRegion
Create a circular TerrainRegion
| Script | ||
createFadeIn(duration:uint, color:uint = 0xff000000):Transition
Create a fade in transition for use in scene switching. | Script | ||
createFadeOut(duration:uint, color:uint = 0xff000000):Transition
Create a fade out transition for use in scene switching. | Script | ||
createGrayscaleFilter():ColorMatrixFilter [static] | Script | ||
Script | |||
createHueFilter(h:Number):ColorMatrixFilter [static] | Script | ||
Script | |||
Script | |||
createNegativeFilter():ColorMatrixFilter [static] | Script | ||
createPanel(x:int, y:int, w:int, h:int):Panel | Script | ||
Creates an actor of the given type at the given location and layer. | Script | ||
createSaturationFilter(s:Number):ColorMatrixFilter [static] | Script | ||
createSepiaFilter():ColorMatrixFilter [static] | Script | ||
Script | |||
Script | |||
createTintFilter(color:uint, amount:Number = 1):ColorMatrixFilter [static] | Script | ||
destroyJoint(j:b2Joint):void | Script | ||
destroyJointByID(jointID:int):void | Script | ||
disableBehaviorForScene(behaviorName:String):void
Disable the given Behavior (by name) for the current scene
| Script | ||
disableCursor():void | Script | ||
disableDebugDrawing():void | Script | ||
disableGlobalSleeping():void | Script | ||
disableThisBehavior():void
Disable the current Behavior. | Script | ||
doesCustomDrawing():void
Call this if you need to do any drawing using draw()
| Script | ||
Script | |||
enableBehaviorForScene(behaviorName:String):void
Enable the given Behavior (by name) for the current scene
| Script | ||
enableContinuousCollisions():void | Script | ||
enableCursor():void | Script | ||
enableDebugDrawing(debugColor:uint = 0xff000000):void | Script | ||
enableGlobalSleeping():void | Script | ||
Script | |||
F(x:*, y:*, z:*):* | Script | ||
fadeInForAllSounds(time:int):void | Script | ||
fadeOutForAllSounds(time:int):void | Script | ||
fadeTileLayerTo(layerID:uint, alphaPct:uint, duration:uint, easing:String = linear):void
Force the given layer to fade to the given opacity over time, applying the easing function. | Script | ||
FF(a:*, b:*, c:*, d:*, x:*, s:*, ac:*):* | Script | ||
format(message:String, ... args):void | Script | ||
forwardMessage(msg:String):void
Internal use only. | Script | ||
G(x:*, y:*, z:*):* | Script | ||
Script | |||
getActorGroup(groupID:Number):FlxGroup | Script | ||
getActorsAlongLine(x1:int, y1:int, x2:int, y2:int, callback:Function):void | Script | ||
getActorsAtPoint(x:int, y:int, callback:Function):void | Script | ||
getActorsInArea(x:int, y:int, w:int, h:int, callback:Function):void | Script | ||
getActorsInRegion(r:Region):Array
Returns an Array of Actors that intersect the Region
| Script | ||
Script | |||
getActorsOnScreen(callback:Function):void | Script | ||
getActorType(actorTypeID:uint):ActorType | Script | ||
getActorTypeByName(typeName:String):ActorType | Script | ||
getAllActorTypes():Array | Script | ||
getAllRegions():Array
Get all Regions in a Scene
| Script | ||
getAllTerrainRegions():Array
Get all Regions in a Scene
| Script | ||
getBottomLayer():int | Script | ||
Returns the actor that represents the camera
| Script | ||
getCurrentScene():uint
Get the ID of the current scene. | Script | ||
getCurrentSceneName():String
Get the name of the current scene. | Script | ||
Script | |||
getFPS():uint | Script | ||
getGameAttribute(name:String):* | Script | ||
getGravity():V2 | Script | ||
Script | |||
getIDForResource(name:String):uint | Script | ||
getIDForScene(sceneName:String):uint
Get the ID of a scene by name. | Script | ||
getImageForActorType(type:ActorType):BitmapData
Returns the 'default' image for the given actor type. | Script | ||
Script | |||
Returns the last actor created in this scene. | Script | ||
Script | |||
Script | |||
Script | |||
Return the last created region
| Script | ||
Return the last created terrain region
| Script | ||
getMiddleLayer():int | Script | ||
getMousePressedX():Number | Script | ||
getMousePressedY():Number | Script | ||
getMouseReleasedX():Number | Script | ||
getMouseReleasedY():Number | Script | ||
getMouseWorldX():Number | Script | ||
getMouseWorldY():Number | Script | ||
getMouseX():Number | Script | ||
getMouseY():Number | Script | ||
getPlayerName():String | Script | ||
Get a particular Region based on internal ID
| Script | ||
Script | |||
Get the current scene. | Script | ||
getSceneHeight():uint
Get the height (in pixels) of the current scene. | Script | ||
getSceneWidth():uint
Get the width (in pixels) of the current scene. | Script | ||
getScore(scoreName:String, callback:Function = null):void | Script | ||
getScores(scoreName:String, numberToGrab:uint, callback:Function = null):void | Script | ||
getScreenHeight():uint | Script | ||
getScreenWidth():uint | Script | ||
getScreenX():int
x-position of the camera
| Script | ||
getScreenY():int
y-position of the camera
| Script | ||
Script | |||
getStepSize():uint | Script | ||
getTerrainRegion(terrainRegionID:int):TerrainRegion
Get a particular Region based on internal ID
| Script | ||
Returns the Tile at the specified row and column, or null if no tile is found
nbsp;
| Script | ||
getTileHeight():uint
Get the height (in tiles) of the current scene. | Script | ||
getTileWidth():uint
Get the width (in tiles) of the current scene. | Script | ||
getTopLayer():int | Script | ||
getValueForScene(behaviorName:String, attributeName:String):Object | Script | ||
GG(a:*, b:*, c:*, d:*, x:*, s:*, ac:*):* | Script | ||
H(x:*, y:*, z:*):* | Script | ||
handleCollision(event:Collision):void
Handle a collision with another Actor. | Script | ||
HH(a:*, b:*, c:*, d:*, x:*, s:*, ac:*):* | Script | ||
hideCursor():void | Script | ||
hideFPS():void | Script | ||
hideTileLayer(layerID:uint):void
Force the given layer to become invisible. | Script | ||
I(x:*, y:*, z:*):* | Script | ||
II(a:*, b:*, c:*, d:*, x:*, s:*, ac:*):* | Script | ||
init():void
Called whenever this Actor or Scene is created. | Script | ||
initKongregate():void | Script | ||
isBehaviorEnabledForScene(behaviorName:String):Boolean
Check if the current scene contains the given Behavior (by name) and if said behavior is enabled. | Script | ||
isCtrlDown():Boolean | Script | ||
isGuest():Boolean | Script | ||
Check whether the Actor intersects the Region
| Script | ||
isKeyDown(abstractKey:String):Boolean | Script | ||
isKeyPressed(abstractKey:String):Boolean | Script | ||
isKeyReleased(abstractKey:String):Boolean | Script | ||
isMouseDown():Boolean | Script | ||
isMousePressed():Boolean | Script | ||
isMouseReleased():Boolean | Script | ||
isShiftDown():Boolean | Script | ||
isTransitioning():Boolean | Script | ||
kongGetUserId():Number | Script | ||
kongGetUsername():String | Script | ||
kongIsGuest():Boolean | Script | ||
kongSubmitStat(statName:String, value:Number):void | Script | ||
Script | |||
loadGame(fileName:String, callback:Function = null):void | Script | ||
makeActorNotPassThroughTerrain(actor:Actor):void | Script | ||
MD5(string:String):String | Script | ||
mute():void | Script | ||
openURLInBrowser(URL:String):void | Script | ||
pauseAll():void | Script | ||
Script | |||
print(message:*):void | Script | ||
randomFloat():Number | Script | ||
randomInt(low:int, high:int):Number | Script | ||
recycleActor(a:Actor):void | Script | ||
Reload the current scene, using an exit transition and then an enter transition. | Script | ||
removeRegion(regionID:int):void
Remove a Region from a Scene
| Script | ||
removeTerrainRegion(terrainRegionID:int):void
Remove a Region from a Scene
| Script | ||
removeTileAt(row:int, col:int, layer:int):void
Remove a tile from a scene at runtime at the specified row and column. | Script | ||
retrieveSaves(callback:Function = null):void | Script | ||
RotateLeft(lValue:*, iShiftBits:*):*
MD5 (Message-Digest Algorithm)
http://www.webtoolkit.info/
| Script | ||
runLater(delay:uint, toExecute:Function):void
Runs the given function after a delay. | Script | ||
runPeriodically(interval:uint, toExecute:Function):void
Runs the given function periodically (every n seconds). | Script | ||
sameAs(one:*, two:*):Boolean [static]
A generic way to compare two values or objects. | Script | ||
saveGame(fileName:String, displayTitle:String, callback:Function = null):void | Script | ||
sayToScene(behaviorName:String, msg:String, ... args):Object | Script | ||
sceneHasBehavior(behaviorName:String):Boolean
Check if the current scene contains the given Behavior (by name)
| Script | ||
sendRootPanelBack():void | Script | ||
sendRootPanelToBack():void | Script | ||
setCursor(graphic:Class = null, xOffset:int = 0, yOffset:int = 0):void | Script | ||
setFPS(desiredFPS:uint):void | Script | ||
setGameAttribute(name:String, value:*):void | Script | ||
setGravity(x:Number, y:Number):void | Script | ||
setLocationForAllSounds(location:Number):void | Script | ||
setOffscreenTolerance(top:int, left:int, bottom:int, right:int):void | Script | ||
setScrollSpeedForBackground(xSpeed:Number, ySpeed:Number):void | Script | ||
setTileAt(row:int, col:int, layer:int, tilesetID:int, tileID:int):void
Add a tile to the scene at runtime in the specified row and column
| Script | ||
setTimeScale(scale:Number):void | Script | ||
setValueForScene(behaviorName:String, attributeName:String, value:Object):void | Script | ||
setVolumeForAllSounds(volume:Number):void | Script | ||
shoutToScene(msg:String, ... args):Object | Script | ||
showCursor():void | Script | ||
showTileLayer(layerID:uint):void
Force the given layer to show. | Script | ||
simpleTweet(message:String, gameURL:String):void | Script | ||
startFadeIn(color:uint = 0xffffffff, duration:Number = 1000, forceReset:Boolean = false):void | Script | ||
startFadeOut(color:uint = 0xffffffff, duration:Number = 1000, forceReset:Boolean = false):void | Script | ||
startShakingScreen(intensity:Number = 0.05, duration:Number = 500):void | Script | ||
stopAllSounds():void | Script | ||
stopFadeIn():void | Script | ||
stopFadeOut():void | Script | ||
stopShakingScreen():void | Script | ||
submitScore(scoreName:String, value:Number, callback:Function = null):void | Script | ||
Switch to the given scene, using an exit transition and then an enter transition. | Script | ||
toPhysicalUnits(value:Number):Number | Script | ||
toPixelUnits(value:Number):Number | Script | ||
tween(attribute:Object = null, params:Object = null):Boolean [static] | Script | ||
tweenNumber(attributeName:String, toValue:Number, duration:Number, easing:String):Boolean | Script | ||
unmute():void | Script | ||
unpauseAll():void | Script | ||
update():void
Called each time the game steps forward. | Script | ||
Utf8Encode(string:String):String | Script | ||
visitURL(URL:String, callback:Function = null):void | Script | ||
WordToHex(lValue:*):* | Script | ||
Script |
Method | Defined By | ||
---|---|---|---|
registerCollisionHandler(a:Actor):void
Call this if you want to receive collision events for the actor. | Script |
BACK | property |
public static var BACK:int = 2
FRONT | property |
public static var FRONT:int = 0
GET_SCORE_URL | property |
public static var GET_SCORE_URL:String = http://www.stencyl.com/v10/api/score/getForCurrentPlayer/
GET_SCORES_URL | property |
public static var GET_SCORES_URL:String = http://www.stencyl.com/v10/api/score/getTopEntries/
lastCreatedActor | property |
public static var lastCreatedActor:Actor = null
lastCreatedJoint | property |
public static var lastCreatedJoint:b2Joint = null
lastCreatedLabel | property |
public static var lastCreatedLabel:Label = null
lastCreatedPanel | property |
public static var lastCreatedPanel:Panel = null
lastCreatedRegion | property |
public static var lastCreatedRegion:Region = null
lastCreatedTerrainRegion | property |
public static var lastCreatedTerrainRegion:TerrainRegion = null
MIDDLE | property |
public static var MIDDLE:int = 1
mpx | property |
public static var mpx:Number = 0
mpy | property |
public static var mpy:Number = 0
mrx | property |
public static var mrx:Number = 0
mry | property |
public static var mry:Number = 0
scene | property |
public var scene:GameState
SUBMIT_SCORE_URL | property |
public static var SUBMIT_SCORE_URL:String = http://www.stencyl.com/v10/api/score/submit/
wrapper | property |
public var wrapper:Behavior
Script | () | Constructor |
abortTween | () | method |
public static function abortTween(target:Object):void
Parameters
target:Object |
AddUnsigned | () | method |
public function AddUnsigned(lX:*, lY:*):*
Parameters
lX:* | |
lY:* |
* |
adjustLocationForAllSounds | () | method |
public function adjustLocationForAllSounds(time:uint, volume:Number):void
Parameters
time:uint | |
volume:Number |
asBoolean | () | method |
public static function asBoolean(o:*):Boolean
Accepts a literal boolean or String boolean.
Parameters
o:* |
Boolean |
bringRootPanelForward | () | method |
public function bringRootPanelForward():void
bringRootPanelToFront | () | method |
public function bringRootPanelToFront():void
ConvertToWordArray | () | method |
public function ConvertToWordArray(string:String):*
Parameters
string:String |
* |
createActor | () | method |
public function createActor(type:ActorType, x:Number, y:Number, layerConst:int):Actor
Creates an actor of the given type at the given location and layer.
Parameters
type:ActorType — the type of the Actor to create
| |
x:Number — x-position of actor
| |
y:Number — y-position of actor
| |
layerConst:int — FRONT, MIDDLE or BACK
|
Actor — The created actor
|
createActorInNextScene | () | method |
public function createActorInNextScene(type:ActorType, x:Number, y:Number, layerConst:int):void
Creates an actor of the given type at the given location and layer when the next scene begins. You call this in the previous scene. Good for cases like entering doors and placing the main character at the right place.
Parameters
type:ActorType — the type of the Actor to create
| |
x:Number — x-position of actor
| |
y:Number — y-position of actor
| |
layerConst:int — FRONT, MIDDLE or BACK
|
createBoxRegion | () | method |
public function createBoxRegion(x:int, y:int, w:int, h:int):Region
Create a rectangular Region
Parameters
x:int — x-position of the Region
| |
y:int — y-position of the Region
| |
w:int — width of the Region
| |
h:int — height of the Region
|
Region — The newly created Region
|
createBoxTerrainRegion | () | method |
public function createBoxTerrainRegion(x:int, y:int, w:int, h:int):TerrainRegion
Create a rectangular TerrainRegion
Parameters
x:int — x-position of the TerrainRegion
| |
y:int — y-position of the TerrainRegion
| |
w:int — width of the TerrainRegion
| |
h:int — height of the TerrainRegion
|
TerrainRegion — The newly created TerrainRegion
|
createBrightnessFilter | () | method |
public static function createBrightnessFilter(b:Number):ColorMatrixFilter
Parameters
b:Number |
ColorMatrixFilter |
createCircularRegion | () | method |
public function createCircularRegion(x:int, y:int, r:int):Region
Create a circular Region
Parameters
x:int — x-position of the Region
| |
y:int — y-position of the Region
| |
r:int — radius of the Region
|
Region — The newly created Region
|
createCircularTerrainRegion | () | method |
public function createCircularTerrainRegion(x:int, y:int, r:int):TerrainRegion
Create a circular TerrainRegion
Parameters
x:int — x-position of the TerrainRegion
| |
y:int — y-position of the TerrainRegion
| |
r:int — radius of the TerrainRegion
|
TerrainRegion — The newly created TerrainRegion
|
createFadeIn | () | method |
public function createFadeIn(duration:uint, color:uint = 0xff000000):Transition
Create a fade in transition for use in scene switching.
Parameters
duration:uint — how long the transition lasts (in milliseconds)
| |
color:uint (default = 0xff000000 ) — color to fade in to. Default is black.
|
Transition — Fade in transition that you pass into reloadScene and switchScene
|
createFadeOut | () | method |
public function createFadeOut(duration:uint, color:uint = 0xff000000):Transition
Create a fade out transition for use in scene switching.
Parameters
duration:uint — how long the transition lasts (in milliseconds)
| |
color:uint (default = 0xff000000 ) — color to fade out to. Default is black.
|
Transition — Fade out transition that you pass into reloadScene and switchScene
|
createGrayscaleFilter | () | method |
public static function createGrayscaleFilter():ColorMatrixFilter
ReturnsColorMatrixFilter |
createHingeJoint | () | method |
public function createHingeJoint(one:b2Body, two:b2Body = null, pt:V2 = null):b2RevoluteJoint
Parameters
one:b2Body | |
two:b2Body (default = null )
| |
pt:V2 (default = null )
|
b2RevoluteJoint |
createHueFilter | () | method |
public static function createHueFilter(h:Number):ColorMatrixFilter
Parameters
h:Number |
ColorMatrixFilter |
createLabel | () | method |
public function createLabel(font:Font, text:String, x:int, y:int):Label
Parameters
font:Font | |
text:String | |
x:int | |
y:int |
Label |
createMultilineLabel | () | method |
public function createMultilineLabel(font:Font, text:String, x:int, y:int, w:int):Panel
Parameters
font:Font | |
text:String | |
x:int | |
y:int | |
w:int |
Panel |
createNegativeFilter | () | method |
public static function createNegativeFilter():ColorMatrixFilter
ReturnsColorMatrixFilter |
createPanel | () | method |
public function createPanel(x:int, y:int, w:int, h:int):Panel
Parameters
x:int | |
y:int | |
w:int | |
h:int |
Panel |
createRecycledActor | () | method |
public function createRecycledActor(type:ActorType, x:Number, y:Number, layerConst:int):Actor
Creates an actor of the given type at the given location and layer. It will attempt to use an unused instance of the actor type, or if none are available, it will create a new one instead.
Parameters
type:ActorType — the type of the Actor to create
| |
x:Number — x-position of actor
| |
y:Number — y-position of actor
| |
layerConst:int — FRONT, MIDDLE or BACK
|
Actor — The created actor
|
createSaturationFilter | () | method |
public static function createSaturationFilter(s:Number):ColorMatrixFilter
Parameters
s:Number |
ColorMatrixFilter |
createSepiaFilter | () | method |
public static function createSepiaFilter():ColorMatrixFilter
ReturnsColorMatrixFilter |
createSlidingJoint | () | method |
public function createSlidingJoint(one:b2Body, two:b2Body = null, dir:V2 = null):b2LineJoint
Parameters
one:b2Body | |
two:b2Body (default = null )
| |
dir:V2 (default = null )
|
b2LineJoint |
createStickJoint | () | method |
public function createStickJoint(one:b2Body, two:b2Body, p1:V2 = null, p2:V2 = null):b2DistanceJoint
Parameters
one:b2Body | |
two:b2Body | |
p1:V2 (default = null )
| |
p2:V2 (default = null )
|
b2DistanceJoint |
createTintFilter | () | method |
public static function createTintFilter(color:uint, amount:Number = 1):ColorMatrixFilter
Parameters
color:uint | |
amount:Number (default = 1 )
|
ColorMatrixFilter |
destroyJoint | () | method |
destroyJointByID | () | method |
public function destroyJointByID(jointID:int):void
Parameters
jointID:int |
disableBehaviorForScene | () | method |
public function disableBehaviorForScene(behaviorName:String):void
Disable the given Behavior (by name) for the current scene
Parameters
behaviorName:String — The display name of the Behavior
|
disableCursor | () | method |
public function disableCursor():void
disableDebugDrawing | () | method |
public function disableDebugDrawing():void
disableGlobalSleeping | () | method |
public function disableGlobalSleeping():void
disableThisBehavior | () | method |
public function disableThisBehavior():void
Disable the current Behavior. The rest of this script will continue running, and cessation happens for any future run.
doesCustomDrawing | () | method |
public function doesCustomDrawing():void
Call this if you need to do any drawing using draw()
draw | () | method |
enableBehaviorForScene | () | method |
public function enableBehaviorForScene(behaviorName:String):void
Enable the given Behavior (by name) for the current scene
Parameters
behaviorName:String — The display name of the Behavior
|
enableContinuousCollisions | () | method |
public function enableContinuousCollisions():void
enableCursor | () | method |
public function enableCursor():void
enableDebugDrawing | () | method |
public function enableDebugDrawing(debugColor:uint = 0xff000000):void
Parameters
debugColor:uint (default = 0xff000000 )
|
enableGlobalSleeping | () | method |
public function enableGlobalSleeping():void
enteredRegion | () | method |
F | () | method |
public function F(x:*, y:*, z:*):*
Parameters
x:* | |
y:* | |
z:* |
* |
fadeInForAllSounds | () | method |
public function fadeInForAllSounds(time:int):void
Parameters
time:int |
fadeOutForAllSounds | () | method |
public function fadeOutForAllSounds(time:int):void
Parameters
time:int |
fadeTileLayerTo | () | method |
public function fadeTileLayerTo(layerID:uint, alphaPct:uint, duration:uint, easing:String = linear):void
Force the given layer to fade to the given opacity over time, applying the easing function.
Parameters
layerID:uint — ID of the layer
| |
alphaPct:uint — the opacity (0-255) to fade to
| |
duration:uint — the duration of the fading (in milliseconds)
| |
easing:String (default = linear ) — easing function to apply. Linear (no smoothing) is the default.
|
FF | () | method |
public function FF(a:*, b:*, c:*, d:*, x:*, s:*, ac:*):*
Parameters
a:* | |
b:* | |
c:* | |
d:* | |
x:* | |
s:* | |
ac:* |
* |
format | () | method |
public function format(message:String, ... args):void
Parameters
message:String | |
... args |
forwardMessage | () | method |
public function forwardMessage(msg:String):void
Internal use only.
Parameters
msg:String |
G | () | method |
public function G(x:*, y:*, z:*):*
Parameters
x:* | |
y:* | |
z:* |
* |
getActor | () | method |
getActorGroup | () | method |
getActorsAlongLine | () | method |
public function getActorsAlongLine(x1:int, y1:int, x2:int, y2:int, callback:Function):void
Parameters
x1:int | |
y1:int | |
x2:int | |
y2:int | |
callback:Function |
getActorsAtPoint | () | method |
public function getActorsAtPoint(x:int, y:int, callback:Function):void
Parameters
x:int | |
y:int | |
callback:Function |
getActorsInArea | () | method |
public function getActorsInArea(x:int, y:int, w:int, h:int, callback:Function):void
Parameters
x:int | |
y:int | |
w:int | |
h:int | |
callback:Function |
getActorsInRegion | () | method |
public function getActorsInRegion(r:Region):Array
Returns an Array
of Actors that intersect the Region
Parameters
r:Region — the Region
|
Array — An Array of Actors
|
getActorsOfType | () | method |
getActorsOnScreen | () | method |
public function getActorsOnScreen(callback:Function):void
Parameters
callback:Function |
getActorType | () | method |
public function getActorType(actorTypeID:uint):ActorType
Parameters
actorTypeID:uint |
ActorType |
getActorTypeByName | () | method |
public function getActorTypeByName(typeName:String):ActorType
Parameters
typeName:String |
ActorType |
getAllActorTypes | () | method |
public function getAllActorTypes():Array
ReturnsArray |
getAllRegions | () | method |
public function getAllRegions():Array
Get all Regions in a Scene
ReturnsArray — An Array of all Region s in the Scene
|
getAllTerrainRegions | () | method |
public function getAllTerrainRegions():Array
Get all Regions in a Scene
ReturnsArray — An Array of all Region s in the Scene
|
getBottomLayer | () | method |
public function getBottomLayer():int
Returnsint |
getCamera | () | method |
public function getCamera():Actor
Returns the actor that represents the camera
ReturnsActor — The actor representing the camera
|
getCurrentScene | () | method |
public function getCurrentScene():uint
Get the ID of the current scene.
Returnsuint — The ID current scene
|
getCurrentSceneName | () | method |
public function getCurrentSceneName():String
Get the name of the current scene.
ReturnsString — The name of the current scene
|
getFont | () | method |
getFPS | () | method |
public function getFPS():uint
Returnsuint |
getGameAttribute | () | method |
public function getGameAttribute(name:String):*
Parameters
name:String |
* |
getGravity | () | method |
getGroundBody | () | method |
getIDForResource | () | method |
public function getIDForResource(name:String):uint
Parameters
name:String |
uint |
getIDForScene | () | method |
public function getIDForScene(sceneName:String):uint
Get the ID of a scene by name.
Parameters
sceneName:String |
uint — The ID current scene or 0 if it doesn't exist.
|
getImageForActorType | () | method |
public function getImageForActorType(type:ActorType):BitmapData
Returns the 'default' image for the given actor type.
Parameters
type:ActorType — the type of the Actor to create
|
BitmapData — The first frame for the default animation for the actor (or blank if none)
|
getJoint | () | method |
getLastCreatedActor | () | method |
public function getLastCreatedActor():Actor
Returns the last actor created in this scene. If the actor is dead, returns null.
ReturnsActor — The last created actor in this scene
|
getLastCreatedJoint | () | method |
getLastCreatedLabel | () | method |
getLastCreatedPanel | () | method |
getLastCreatedRegion | () | method |
public function getLastCreatedRegion():Region
Return the last created region
ReturnsRegion — The last created Region
|
getLastCreatedTerrainRegion | () | method |
public function getLastCreatedTerrainRegion():TerrainRegion
Return the last created terrain region
ReturnsTerrainRegion — The last created Terrain Region
|
getMiddleLayer | () | method |
public function getMiddleLayer():int
Returnsint |
getMousePressedX | () | method |
public function getMousePressedX():Number
ReturnsNumber |
getMousePressedY | () | method |
public function getMousePressedY():Number
ReturnsNumber |
getMouseReleasedX | () | method |
public function getMouseReleasedX():Number
ReturnsNumber |
getMouseReleasedY | () | method |
public function getMouseReleasedY():Number
ReturnsNumber |
getMouseWorldX | () | method |
public function getMouseWorldX():Number
ReturnsNumber |
getMouseWorldY | () | method |
public function getMouseWorldY():Number
ReturnsNumber |
getMouseX | () | method |
public function getMouseX():Number
ReturnsNumber |
getMouseY | () | method |
public function getMouseY():Number
ReturnsNumber |
getPlayerName | () | method |
public function getPlayerName():String
ReturnsString |
getRegion | () | method |
public function getRegion(regionID:int):Region
Get a particular Region based on internal ID
Parameters
regionID:int — The internal ID of the Region you want to return
|
Region — A particular Region from the Scene
|
getRootPanel | () | method |
getScene | () | method |
getSceneHeight | () | method |
public function getSceneHeight():uint
Get the height (in pixels) of the current scene.
Returnsuint — height (in pixels) of the current scene
|
getSceneWidth | () | method |
public function getSceneWidth():uint
Get the width (in pixels) of the current scene.
Returnsuint — width (in pixels) of the current scene
|
getScore | () | method |
public function getScore(scoreName:String, callback:Function = null):void
Parameters
scoreName:String | |
callback:Function (default = null )
|
getScores | () | method |
public function getScores(scoreName:String, numberToGrab:uint, callback:Function = null):void
Parameters
scoreName:String | |
numberToGrab:uint | |
callback:Function (default = null )
|
getScreenHeight | () | method |
public function getScreenHeight():uint
Returnsuint |
getScreenWidth | () | method |
public function getScreenWidth():uint
Returnsuint |
getScreenX | () | method |
public function getScreenX():int
x-position of the camera
Returnsint — The x-position of the camera
|
getScreenY | () | method |
public function getScreenY():int
y-position of the camera
Returnsint — The y-position of the camera
|
getSound | () | method |
getStepSize | () | method |
public function getStepSize():uint
Returnsuint |
getTerrainRegion | () | method |
public function getTerrainRegion(terrainRegionID:int):TerrainRegion
Get a particular Region based on internal ID
Parameters
terrainRegionID:int — The internal ID of the Region you want to return
|
TerrainRegion — A particular Region from the Scene
|
getTileAt | () | method |
public function getTileAt(row:int, col:int, layer:int):Tile
Returns the Tile at the specified row and column, or null if no tile is found nbsp;
Parameters
row:int — Row within the scene
| |
col:int — Column within the scene
| |
layer:int — Layer order
|
Tile — Tile Tile at the specified location, or null
|
getTileHeight | () | method |
public function getTileHeight():uint
Get the height (in tiles) of the current scene.
Returnsuint — height (in tiles) of the current scene
|
getTileWidth | () | method |
public function getTileWidth():uint
Get the width (in tiles) of the current scene.
Returnsuint — width (in tiles) of the current scene
|
getTopLayer | () | method |
public function getTopLayer():int
Returnsint |
getValueForScene | () | method |
public function getValueForScene(behaviorName:String, attributeName:String):Object
Parameters
behaviorName:String | |
attributeName:String |
Object |
GG | () | method |
public function GG(a:*, b:*, c:*, d:*, x:*, s:*, ac:*):*
Parameters
a:* | |
b:* | |
c:* | |
d:* | |
x:* | |
s:* | |
ac:* |
* |
H | () | method |
public function H(x:*, y:*, z:*):*
Parameters
x:* | |
y:* | |
z:* |
* |
handleCollision | () | method |
public function handleCollision(event:Collision):void
Handle a collision with another Actor. Automatically called by the engine. Must call registerCollisionHandler() for this to happen.
Parameters
event:Collision — Collision event
|
HH | () | method |
public function HH(a:*, b:*, c:*, d:*, x:*, s:*, ac:*):*
Parameters
a:* | |
b:* | |
c:* | |
d:* | |
x:* | |
s:* | |
ac:* |
* |
hideCursor | () | method |
public function hideCursor():void
hideFPS | () | method |
public function hideFPS():void
hideTileLayer | () | method |
public function hideTileLayer(layerID:uint):void
Force the given layer to become invisible.
Parameters
layerID:uint — ID of the layer
|
I | () | method |
public function I(x:*, y:*, z:*):*
Parameters
x:* | |
y:* | |
z:* |
* |
II | () | method |
public function II(a:*, b:*, c:*, d:*, x:*, s:*, ac:*):*
Parameters
a:* | |
b:* | |
c:* | |
d:* | |
x:* | |
s:* | |
ac:* |
* |
init | () | method |
public function init():void
Called whenever this Actor or Scene is created.
initKongregate | () | method |
public function initKongregate():void
isBehaviorEnabledForScene | () | method |
public function isBehaviorEnabledForScene(behaviorName:String):Boolean
Check if the current scene contains the given Behavior (by name) and if said behavior is enabled.
Parameters
behaviorName:String — The display name of the Behavior
|
Boolean — True if the scene contains the Behavior AND said behavior is enabled
|
isCtrlDown | () | method |
public function isCtrlDown():Boolean
ReturnsBoolean |
isGuest | () | method |
public function isGuest():Boolean
ReturnsBoolean |
isInRegion | () | method |
public function isInRegion(a:Actor, r:Region):Boolean
Check whether the Actor
intersects the Region
Parameters
a:Actor — the Actor
| |
r:Region — the Region
|
Boolean — True if the actor's bounds intersect the Region
|
isKeyDown | () | method |
public function isKeyDown(abstractKey:String):Boolean
Parameters
abstractKey:String |
Boolean |
isKeyPressed | () | method |
public function isKeyPressed(abstractKey:String):Boolean
Parameters
abstractKey:String |
Boolean |
isKeyReleased | () | method |
public function isKeyReleased(abstractKey:String):Boolean
Parameters
abstractKey:String |
Boolean |
isMouseDown | () | method |
public function isMouseDown():Boolean
ReturnsBoolean |
isMousePressed | () | method |
public function isMousePressed():Boolean
ReturnsBoolean |
isMouseReleased | () | method |
public function isMouseReleased():Boolean
ReturnsBoolean |
isShiftDown | () | method |
public function isShiftDown():Boolean
ReturnsBoolean |
isTransitioning | () | method |
public function isTransitioning():Boolean
ReturnsBoolean |
kongGetUserId | () | method |
public function kongGetUserId():Number
ReturnsNumber |
kongGetUsername | () | method |
public function kongGetUsername():String
ReturnsString |
kongIsGuest | () | method |
public function kongIsGuest():Boolean
ReturnsBoolean |
kongSubmitStat | () | method |
public function kongSubmitStat(statName:String, value:Number):void
Parameters
statName:String | |
value:Number |
leftRegion | () | method |
loadGame | () | method |
public function loadGame(fileName:String, callback:Function = null):void
Parameters
fileName:String | |
callback:Function (default = null )
|
makeActorNotPassThroughTerrain | () | method |
MD5 | () | method |
public function MD5(string:String):String
Parameters
string:String |
String |
mute | () | method |
public function mute():void
openURLInBrowser | () | method |
public function openURLInBrowser(URL:String):void
Parameters
URL:String |
pauseAll | () | method |
public function pauseAll():void
preWrap | () | method |
public function preWrap(text:String, maxWidth:int, font:Font):String
Parameters
text:String | |
maxWidth:int | |
font:Font |
String |
() | method |
public function print(message:*):void
Parameters
message:* |
randomFloat | () | method |
public function randomFloat():Number
ReturnsNumber |
randomInt | () | method |
public function randomInt(low:int, high:int):Number
Parameters
low:int | |
high:int |
Number |
recycleActor | () | method |
registerCollisionHandler | () | method |
protected function registerCollisionHandler(a:Actor):void
Call this if you want to receive collision events for the actor.
Parameters
a:Actor — The actor whose collisions you want to receive
|
reloadCurrentScene | () | method |
public function reloadCurrentScene(leave:Transition = null, enter:Transition = null):void
Reload the current scene, using an exit transition and then an enter transition.
Parameters
leave:Transition (default = null ) — exit transition
| |
enter:Transition (default = null ) — enter transition
|
removeRegion | () | method |
public function removeRegion(regionID:int):void
Remove a Region from a Scene
Parameters
regionID:int — The internal ID of the Region you want to remove
|
removeTerrainRegion | () | method |
public function removeTerrainRegion(terrainRegionID:int):void
Remove a Region from a Scene
Parameters
terrainRegionID:int — The internal ID of the Region you want to remove
|
removeTileAt | () | method |
public function removeTileAt(row:int, col:int, layer:int):void
Remove a tile from a scene at runtime at the specified row and column. Only removes tiles that were added at runtime.
Parameters
row:int — Row within the scene
| |
col:int — Column within the scene
| |
layer:int — Layer order
|
retrieveSaves | () | method |
public function retrieveSaves(callback:Function = null):void
Parameters
callback:Function (default = null )
|
RotateLeft | () | method |
public function RotateLeft(lValue:*, iShiftBits:*):*
MD5 (Message-Digest Algorithm) http://www.webtoolkit.info/
Parameters
lValue:* | |
iShiftBits:* |
* |
runLater | () | method |
public function runLater(delay:uint, toExecute:Function):void
Runs the given function after a delay.
Parameters
delay:uint — Delay in execution (in milliseconds)
| |
toExecute:Function — The function to execute after the delay
|
runPeriodically | () | method |
public function runPeriodically(interval:uint, toExecute:Function):void
Runs the given function periodically (every n seconds).
Parameters
interval:uint — How frequently to execute (in milliseconds)
| |
toExecute:Function — The function to execute after the delay
|
sameAs | () | method |
public static function sameAs(one:*, two:*):Boolean
A generic way to compare two values or objects. Used by the visual designer.
Parameters
one:* | |
two:* |
Boolean |
saveGame | () | method |
public function saveGame(fileName:String, displayTitle:String, callback:Function = null):void
Parameters
fileName:String | |
displayTitle:String | |
callback:Function (default = null )
|
sayToScene | () | method |
public function sayToScene(behaviorName:String, msg:String, ... args):Object
Parameters
behaviorName:String | |
msg:String | |
... args |
Object |
sceneHasBehavior | () | method |
public function sceneHasBehavior(behaviorName:String):Boolean
Check if the current scene contains the given Behavior (by name)
Parameters
behaviorName:String — The display name of the Behavior
|
Boolean — True if the scene contains the Behavior
|
sendRootPanelBack | () | method |
public function sendRootPanelBack():void
sendRootPanelToBack | () | method |
public function sendRootPanelToBack():void
setCursor | () | method |
public function setCursor(graphic:Class = null, xOffset:int = 0, yOffset:int = 0):void
Parameters
graphic:Class (default = null )
| |
xOffset:int (default = 0 )
| |
yOffset:int (default = 0 )
|
setFPS | () | method |
public function setFPS(desiredFPS:uint):void
Parameters
desiredFPS:uint |
setGameAttribute | () | method |
public function setGameAttribute(name:String, value:*):void
Parameters
name:String | |
value:* |
setGravity | () | method |
public function setGravity(x:Number, y:Number):void
Parameters
x:Number | |
y:Number |
setLocationForAllSounds | () | method |
public function setLocationForAllSounds(location:Number):void
Parameters
location:Number |
setOffscreenTolerance | () | method |
public function setOffscreenTolerance(top:int, left:int, bottom:int, right:int):void
Parameters
top:int | |
left:int | |
bottom:int | |
right:int |
setScrollSpeedForBackground | () | method |
public function setScrollSpeedForBackground(xSpeed:Number, ySpeed:Number):void
Parameters
xSpeed:Number | |
ySpeed:Number |
setTileAt | () | method |
public function setTileAt(row:int, col:int, layer:int, tilesetID:int, tileID:int):void
Add a tile to the scene at runtime in the specified row and column
Parameters
row:int — Row to add the tile to
| |
col:int — Column to add the tile to
| |
layer:int — Layer order
| |
tilesetID:int — ID of the Tileset to extract from
| |
tileID:int — ID of the Tile from the Tileset
|
setTimeScale | () | method |
public function setTimeScale(scale:Number):void
Parameters
scale:Number |
setValueForScene | () | method |
public function setValueForScene(behaviorName:String, attributeName:String, value:Object):void
Parameters
behaviorName:String | |
attributeName:String | |
value:Object |
setVolumeForAllSounds | () | method |
public function setVolumeForAllSounds(volume:Number):void
Parameters
volume:Number |
shoutToScene | () | method |
public function shoutToScene(msg:String, ... args):Object
Parameters
msg:String | |
... args |
Object |
showCursor | () | method |
public function showCursor():void
showTileLayer | () | method |
public function showTileLayer(layerID:uint):void
Force the given layer to show.
Parameters
layerID:uint — ID of the layer
|
simpleTweet | () | method |
public function simpleTweet(message:String, gameURL:String):void
Parameters
message:String | |
gameURL:String |
startFadeIn | () | method |
public function startFadeIn(color:uint = 0xffffffff, duration:Number = 1000, forceReset:Boolean = false):void
Parameters
color:uint (default = 0xffffffff )
| |
duration:Number (default = 1000 )
| |
forceReset:Boolean (default = false )
|
startFadeOut | () | method |
public function startFadeOut(color:uint = 0xffffffff, duration:Number = 1000, forceReset:Boolean = false):void
Parameters
color:uint (default = 0xffffffff )
| |
duration:Number (default = 1000 )
| |
forceReset:Boolean (default = false )
|
startShakingScreen | () | method |
public function startShakingScreen(intensity:Number = 0.05, duration:Number = 500):void
Parameters
intensity:Number (default = 0.05 )
| |
duration:Number (default = 500 )
|
stopAllSounds | () | method |
public function stopAllSounds():void
stopFadeIn | () | method |
public function stopFadeIn():void
stopFadeOut | () | method |
public function stopFadeOut():void
stopShakingScreen | () | method |
public function stopShakingScreen():void
submitScore | () | method |
public function submitScore(scoreName:String, value:Number, callback:Function = null):void
Parameters
scoreName:String | |
value:Number | |
callback:Function (default = null )
|
switchScene | () | method |
public function switchScene(sceneID:uint, leave:Transition = null, enter:Transition = null):void
Switch to the given scene, using an exit transition and then an enter transition.
Parameters
sceneID:uint — IT of the scene to switch to
| |
leave:Transition (default = null ) — exit transition
| |
enter:Transition (default = null ) — enter transition
|
toPhysicalUnits | () | method |
public function toPhysicalUnits(value:Number):Number
Parameters
value:Number |
Number |
toPixelUnits | () | method |
public function toPixelUnits(value:Number):Number
Parameters
value:Number |
Number |
tween | () | method |
public static function tween(attribute:Object = null, params:Object = null):Boolean
Parameters
attribute:Object (default = null )
| |
params:Object (default = null )
|
Boolean |
tweenNumber | () | method |
public function tweenNumber(attributeName:String, toValue:Number, duration:Number, easing:String):Boolean
Parameters
attributeName:String | |
toValue:Number | |
duration:Number | |
easing:String |
Boolean |
unmute | () | method |
public function unmute():void
unpauseAll | () | method |
public function unpauseAll():void
update | () | method |
public function update():void
Called each time the game steps forward. Automatically called by the engine.
Utf8Encode | () | method |
public function Utf8Encode(string:String):String
Parameters
string:String |
String |
visitURL | () | method |
public function visitURL(URL:String, callback:Function = null):void
Parameters
URL:String | |
callback:Function (default = null )
|
WordToHex | () | method |
public function WordToHex(lValue:*):*
Parameters
lValue:* |
* |
wordWrap | () | method |
public function wordWrap(text:String, maxWidth:int, font:Font):Array
Parameters
text:String | |
maxWidth:int | |
font:Font |
Array |