This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ExperienceBar = {} | |
function ExperienceBar:new(x, y, targetWidth, targetHeight) | |
local group = display.newGroup() | |
group.x = x | |
group.y = y | |
local grayBar = display.newRect(0, 0, targetWidth, targetHeight) | |
group:insert(grayBar) | |
grayBar:setFillColor(102, 102, 102, 200) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.display.Graphics; | |
import flash.display.Sprite; | |
public class Box extends Sprite | |
{ | |
public function Box() | |
{ | |
super(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.external.ExternalInterface; | |
public class console | |
{ | |
public function console() | |
{ | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.thirdiris.viaasplayer.components | |
{ | |
import com.bit101.components.Component; | |
import com.thirdiris.viaasplayer.events.view.VideoMagnifierEvent; | |
import flash.display.Bitmap; | |
import flash.display.BitmapData; | |
import flash.display.BlendMode; | |
import flash.display.DisplayObjectContainer; | |
import flash.display.Graphics; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Iterates over tables in Lua to help you identify what they are. | |
Examples: | |
showProps(self) | |
showProps(_G) | |
]]-- | |
function showProps(o) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Bad | |
- Wrong function signature, no logging, no indication what went wrong, no indication where. | |
- Developers go WTF | |
- QA goes WTF | |
- PM's go WTF | |
- Firebug/Safari/Chrome tell you "404", but not on which file was asking for it, nor why. | |
*/ | |
SomeBackboneCollection.prototype.onError = function(resp) {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>JavaScript Classes</title> | |
</head> | |
<body> | |
<script src="libs/log4javascript/log4javascript_uncompressed.js"></script> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//**************************************************************************** | |
//Copyright (C) 2003 Macromedia, Inc. All Rights Reserved. | |
//The following is Sample Code and is subject to all restrictions on | |
//such code as contained in the End User License Agreement accompanying | |
//this product. | |
//**************************************************************************** | |
/** | |
* base class for event listening and dispatching | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local monitorMem = function() | |
collectgarbage() | |
print( "MemUsage: " .. collectgarbage("count") ) | |
local textMem = system.getInfo( "textureMemoryUsed" ) / 1000000 | |
print( "TexMem: " .. textMem ) | |
end | |
Runtime:addEventListener( "enterFrame", monitorMem ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "physics" | |
display.setStatusBar( display.HiddenStatusBar ) | |
physics.setDrawMode("hybrid") | |
physics.start() | |
physics.setGravity(0, 9.8) | |
physics.setPositionIterations( 10 ) | |
function getGrapplePoint() | |
local point = display.newRect(0, 0, 10, 10) | |
physics.addBody(point,"static", {density = 1, friction = .5, bounce = .1}) |
OlderNewer