| Package | stencyl.api.engine |
| Class | public dynamic class Script |
| Inheritance | Script Object |
| 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):voidParameters
target:Object |
| AddUnsigned | () | method |
public function AddUnsigned(lX:*, lY:*):*Parameters
lX:* | |
lY:* |
* |
| adjustLocationForAllSounds | () | method |
public function adjustLocationForAllSounds(time:uint, volume:Number):voidParameters
time:uint | |
volume:Number |
| asBoolean | () | method |
public static function asBoolean(o:*):BooleanAccepts 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):ActorCreates 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):voidCreates 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):ColorMatrixFilterParameters
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):TransitionCreate 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):TransitionCreate 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():ColorMatrixFilterReturnsColorMatrixFilter |
| createHingeJoint | () | method |
public function createHingeJoint(one:b2Body, two:b2Body = null, pt:V2 = null):b2RevoluteJointParameters
one:b2Body | |
two:b2Body (default = null) | |
pt:V2 (default = null) |
b2RevoluteJoint |
| createHueFilter | () | method |
public static function createHueFilter(h:Number):ColorMatrixFilterParameters
h:Number |
ColorMatrixFilter |
| createLabel | () | method |
public function createLabel(font:Font, text:String, x:int, y:int):LabelParameters
font:Font | |
text:String | |
x:int | |
y:int |
Label |
| createMultilineLabel | () | method |
public function createMultilineLabel(font:Font, text:String, x:int, y:int, w:int):PanelParameters
font:Font | |
text:String | |
x:int | |
y:int | |
w:int |
Panel |
| createNegativeFilter | () | method |
public static function createNegativeFilter():ColorMatrixFilterReturnsColorMatrixFilter |
| createPanel | () | method |
public function createPanel(x:int, y:int, w:int, h:int):PanelParameters
x:int | |
y:int | |
w:int | |
h:int |
Panel |
| createRecycledActor | () | method |
public function createRecycledActor(type:ActorType, x:Number, y:Number, layerConst:int):ActorCreates 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):ColorMatrixFilterParameters
s:Number |
ColorMatrixFilter |
| createSepiaFilter | () | method |
public static function createSepiaFilter():ColorMatrixFilterReturnsColorMatrixFilter |
| createSlidingJoint | () | method |
public function createSlidingJoint(one:b2Body, two:b2Body = null, dir:V2 = null):b2LineJointParameters
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):b2DistanceJointParameters
one:b2Body | |
two:b2Body | |
p1:V2 (default = null) | |
p2:V2 (default = null) |
b2DistanceJoint |
| createTintFilter | () | method |
public static function createTintFilter(color:uint, amount:Number = 1):ColorMatrixFilterParameters
color:uint | |
amount:Number (default = 1) |
ColorMatrixFilter |
| destroyJoint | () | method |
| destroyJointByID | () | method |
public function destroyJointByID(jointID:int):voidParameters
jointID:int |
| disableBehaviorForScene | () | method |
public function disableBehaviorForScene(behaviorName:String):voidDisable 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():voidDisable the current Behavior. The rest of this script will continue running, and cessation happens for any future run.
| doesCustomDrawing | () | method |
public function doesCustomDrawing():voidCall this if you need to do any drawing using draw()
| draw | () | method |
| enableBehaviorForScene | () | method |
public function enableBehaviorForScene(behaviorName:String):voidEnable 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):voidParameters
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):voidParameters
time:int |
| fadeOutForAllSounds | () | method |
public function fadeOutForAllSounds(time:int):voidParameters
time:int |
| fadeTileLayerTo | () | method |
public function fadeTileLayerTo(layerID:uint, alphaPct:uint, duration:uint, easing:String = linear):voidForce 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):voidParameters
message:String | |
... args |
| forwardMessage | () | method |
public function forwardMessage(msg:String):voidInternal 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):voidParameters
x1:int | |
y1:int | |
x2:int | |
y2:int | |
callback:Function |
| getActorsAtPoint | () | method |
public function getActorsAtPoint(x:int, y:int, callback:Function):voidParameters
x:int | |
y:int | |
callback:Function |
| getActorsInArea | () | method |
public function getActorsInArea(x:int, y:int, w:int, h:int, callback:Function):voidParameters
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):voidParameters
callback:Function |
| getActorType | () | method |
public function getActorType(actorTypeID:uint):ActorTypeParameters
actorTypeID:uint |
ActorType |
| getActorTypeByName | () | method |
public function getActorTypeByName(typeName:String):ActorTypeParameters
typeName:String |
ActorType |
| getAllActorTypes | () | method |
public function getAllActorTypes():ArrayReturnsArray |
| getAllRegions | () | method |
public function getAllRegions():ArrayGet all Regions in a Scene
ReturnsArray — An Array of all Regions in the Scene
|
| getAllTerrainRegions | () | method |
public function getAllTerrainRegions():ArrayGet all Regions in a Scene
ReturnsArray — An Array of all Regions in the Scene
|
| getBottomLayer | () | method |
public function getBottomLayer():intReturnsint |
| getCamera | () | method |
public function getCamera():ActorReturns the actor that represents the camera
ReturnsActor — The actor representing the camera
|
| getCurrentScene | () | method |
public function getCurrentScene():uintGet the ID of the current scene.
Returnsuint — The ID current scene
|
| getCurrentSceneName | () | method |
public function getCurrentSceneName():StringGet the name of the current scene.
ReturnsString — The name of the current scene
|
| getFont | () | method |
| getFPS | () | method |
public function getFPS():uintReturnsuint |
| getGameAttribute | () | method |
public function getGameAttribute(name:String):*Parameters
name:String |
* |
| getGravity | () | method |
| getGroundBody | () | method |
| getIDForResource | () | method |
public function getIDForResource(name:String):uintParameters
name:String |
uint |
| getIDForScene | () | method |
public function getIDForScene(sceneName:String):uintGet 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):BitmapDataReturns 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():ActorReturns 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():RegionReturn the last created region
ReturnsRegion — The last created Region
|
| getLastCreatedTerrainRegion | () | method |
public function getLastCreatedTerrainRegion():TerrainRegionReturn the last created terrain region
ReturnsTerrainRegion — The last created Terrain Region
|
| getMiddleLayer | () | method |
public function getMiddleLayer():intReturnsint |
| getMousePressedX | () | method |
public function getMousePressedX():NumberReturnsNumber |
| getMousePressedY | () | method |
public function getMousePressedY():NumberReturnsNumber |
| getMouseReleasedX | () | method |
public function getMouseReleasedX():NumberReturnsNumber |
| getMouseReleasedY | () | method |
public function getMouseReleasedY():NumberReturnsNumber |
| getMouseWorldX | () | method |
public function getMouseWorldX():NumberReturnsNumber |
| getMouseWorldY | () | method |
public function getMouseWorldY():NumberReturnsNumber |
| getMouseX | () | method |
public function getMouseX():NumberReturnsNumber |
| getMouseY | () | method |
public function getMouseY():NumberReturnsNumber |
| getPlayerName | () | method |
public function getPlayerName():StringReturnsString |
| getRegion | () | method |
public function getRegion(regionID:int):RegionGet 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():uintGet the height (in pixels) of the current scene.
Returnsuint — height (in pixels) of the current scene
|
| getSceneWidth | () | method |
public function getSceneWidth():uintGet 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):voidParameters
scoreName:String | |
callback:Function (default = null) |
| getScores | () | method |
public function getScores(scoreName:String, numberToGrab:uint, callback:Function = null):voidParameters
scoreName:String | |
numberToGrab:uint | |
callback:Function (default = null) |
| getScreenHeight | () | method |
public function getScreenHeight():uintReturnsuint |
| getScreenWidth | () | method |
public function getScreenWidth():uintReturnsuint |
| getScreenX | () | method |
public function getScreenX():intx-position of the camera
Returnsint — The x-position of the camera
|
| getScreenY | () | method |
public function getScreenY():inty-position of the camera
Returnsint — The y-position of the camera
|
| getSound | () | method |
| getStepSize | () | method |
public function getStepSize():uintReturnsuint |
| getTerrainRegion | () | method |
public function getTerrainRegion(terrainRegionID:int):TerrainRegionGet 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):TileReturns 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():uintGet the height (in tiles) of the current scene.
Returnsuint — height (in tiles) of the current scene
|
| getTileWidth | () | method |
public function getTileWidth():uintGet the width (in tiles) of the current scene.
Returnsuint — width (in tiles) of the current scene
|
| getTopLayer | () | method |
public function getTopLayer():intReturnsint |
| getValueForScene | () | method |
public function getValueForScene(behaviorName:String, attributeName:String):ObjectParameters
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):voidHandle 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):voidForce 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():voidCalled whenever this Actor or Scene is created.
| initKongregate | () | method |
public function initKongregate():void| isBehaviorEnabledForScene | () | method |
public function isBehaviorEnabledForScene(behaviorName:String):BooleanCheck 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():BooleanReturnsBoolean |
| isGuest | () | method |
public function isGuest():BooleanReturnsBoolean |
| 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):BooleanParameters
abstractKey:String |
Boolean |
| isKeyPressed | () | method |
public function isKeyPressed(abstractKey:String):BooleanParameters
abstractKey:String |
Boolean |
| isKeyReleased | () | method |
public function isKeyReleased(abstractKey:String):BooleanParameters
abstractKey:String |
Boolean |
| isMouseDown | () | method |
public function isMouseDown():BooleanReturnsBoolean |
| isMousePressed | () | method |
public function isMousePressed():BooleanReturnsBoolean |
| isMouseReleased | () | method |
public function isMouseReleased():BooleanReturnsBoolean |
| isShiftDown | () | method |
public function isShiftDown():BooleanReturnsBoolean |
| isTransitioning | () | method |
public function isTransitioning():BooleanReturnsBoolean |
| kongGetUserId | () | method |
public function kongGetUserId():NumberReturnsNumber |
| kongGetUsername | () | method |
public function kongGetUsername():StringReturnsString |
| kongIsGuest | () | method |
public function kongIsGuest():BooleanReturnsBoolean |
| kongSubmitStat | () | method |
public function kongSubmitStat(statName:String, value:Number):voidParameters
statName:String | |
value:Number |
| leftRegion | () | method |
| loadGame | () | method |
public function loadGame(fileName:String, callback:Function = null):voidParameters
fileName:String | |
callback:Function (default = null) |
| makeActorNotPassThroughTerrain | () | method |
| MD5 | () | method |
public function MD5(string:String):StringParameters
string:String |
String |
| mute | () | method |
public function mute():void| openURLInBrowser | () | method |
public function openURLInBrowser(URL:String):voidParameters
URL:String |
| pauseAll | () | method |
public function pauseAll():void| preWrap | () | method |
public function preWrap(text:String, maxWidth:int, font:Font):StringParameters
text:String | |
maxWidth:int | |
font:Font |
String |
| () | method |
public function print(message:*):voidParameters
message:* |
| randomFloat | () | method |
public function randomFloat():NumberReturnsNumber |
| randomInt | () | method |
public function randomInt(low:int, high:int):NumberParameters
low:int | |
high:int |
Number |
| recycleActor | () | method |
| registerCollisionHandler | () | method |
protected function registerCollisionHandler(a:Actor):voidCall 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):voidReload 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):voidRemove 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):voidRemove 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):voidRemove 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):voidParameters
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):voidRuns 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):voidRuns 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:*):BooleanA 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):voidParameters
fileName:String | |
displayTitle:String | |
callback:Function (default = null) |
| sayToScene | () | method |
public function sayToScene(behaviorName:String, msg:String, ... args):ObjectParameters
behaviorName:String | |
msg:String | |
... args |
Object |
| sceneHasBehavior | () | method |
public function sceneHasBehavior(behaviorName:String):BooleanCheck 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):voidParameters
graphic:Class (default = null) | |
xOffset:int (default = 0) | |
yOffset:int (default = 0) |
| setFPS | () | method |
public function setFPS(desiredFPS:uint):voidParameters
desiredFPS:uint |
| setGameAttribute | () | method |
public function setGameAttribute(name:String, value:*):voidParameters
name:String | |
value:* |
| setGravity | () | method |
public function setGravity(x:Number, y:Number):voidParameters
x:Number | |
y:Number |
| setLocationForAllSounds | () | method |
public function setLocationForAllSounds(location:Number):voidParameters
location:Number |
| setOffscreenTolerance | () | method |
public function setOffscreenTolerance(top:int, left:int, bottom:int, right:int):voidParameters
top:int | |
left:int | |
bottom:int | |
right:int |
| setScrollSpeedForBackground | () | method |
public function setScrollSpeedForBackground(xSpeed:Number, ySpeed:Number):voidParameters
xSpeed:Number | |
ySpeed:Number |
| setTileAt | () | method |
public function setTileAt(row:int, col:int, layer:int, tilesetID:int, tileID:int):voidAdd 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):voidParameters
scale:Number |
| setValueForScene | () | method |
public function setValueForScene(behaviorName:String, attributeName:String, value:Object):voidParameters
behaviorName:String | |
attributeName:String | |
value:Object |
| setVolumeForAllSounds | () | method |
public function setVolumeForAllSounds(volume:Number):voidParameters
volume:Number |
| shoutToScene | () | method |
public function shoutToScene(msg:String, ... args):ObjectParameters
msg:String | |
... args |
Object |
| showCursor | () | method |
public function showCursor():void| showTileLayer | () | method |
public function showTileLayer(layerID:uint):voidForce the given layer to show.
Parameters
layerID:uint — ID of the layer
|
| simpleTweet | () | method |
public function simpleTweet(message:String, gameURL:String):voidParameters
message:String | |
gameURL:String |
| startFadeIn | () | method |
public function startFadeIn(color:uint = 0xffffffff, duration:Number = 1000, forceReset:Boolean = false):voidParameters
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):voidParameters
color:uint (default = 0xffffffff) | |
duration:Number (default = 1000) | |
forceReset:Boolean (default = false) |
| startShakingScreen | () | method |
public function startShakingScreen(intensity:Number = 0.05, duration:Number = 500):voidParameters
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):voidParameters
scoreName:String | |
value:Number | |
callback:Function (default = null) |
| switchScene | () | method |
public function switchScene(sceneID:uint, leave:Transition = null, enter:Transition = null):voidSwitch 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):NumberParameters
value:Number |
Number |
| toPixelUnits | () | method |
public function toPixelUnits(value:Number):NumberParameters
value:Number |
Number |
| tween | () | method |
public static function tween(attribute:Object = null, params:Object = null):BooleanParameters
attribute:Object (default = null) | |
params:Object (default = null) |
Boolean |
| tweenNumber | () | method |
public function tweenNumber(attributeName:String, toValue:Number, duration:Number, easing:String):BooleanParameters
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():voidCalled each time the game steps forward. Automatically called by the engine.
| Utf8Encode | () | method |
public function Utf8Encode(string:String):StringParameters
string:String |
String |
| visitURL | () | method |
public function visitURL(URL:String, callback:Function = null):voidParameters
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):ArrayParameters
text:String | |
maxWidth:int | |
font:Font |
Array |