Skip to content

CommandLineCheats

baris edited this page Apr 14, 2022 · 1 revision

Summary CommandLine cheats

Get FlashVars

Assuming your commandline scope is Stage or a DisplayObject

Flash

$C.inspect(loaderInfo.parameters)

Non-Flash

$C.inspect(get_loaderInfo().parameters)

Reduce frame rate

Assuming your commandline scope is Stage or a DisplayObject (replace 5 with your own choice)

Flash

stage.frameRate = 5

Non-Flash

stage.set_frameRate(5)

Log key presses

Assuming your commandline scope is Stage or a DisplayObject
(For some reason I don't understand why, it doesn't catch at all in the cpp target, and it gives a strange error in the html5 target. If you solve the problem, you can open a pull request.)

Flash

stage.addEventListener(flash.events.KeyboardEvent.KEY_DOWN, $C.log);

Non-Flash

stage.addEventListener(openfl.events.KeyboardEvent.KEY_DOWN, $C.log);

Key presses while focused on command line will be ignored as it has Event.stopPropagation().

Copy to clipboard

(replace $returned with a variable/string you want to save)

Flash

flash.system.System.setClipboard($returned)

Non-Flash

openfl.system.System.setClipboard($returned)

Maths

Simple: 10-(5/2)
Advanced: (90*Math.PI)/180 - _ 90 degree in radians _
Bitwise:2761 & 234