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
#import <Foundation/NSTimer.h> | |
@interface NSTimer (PSYBlockTimer) | |
+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds repeats:(BOOL)repeats usingBlock:(void (^)(NSTimer *timer))fireBlock; | |
+ (NSTimer *)timerWithTimeInterval:(NSTimeInterval)seconds repeats:(BOOL)repeats usingBlock:(void (^)(NSTimer *timer))fireBlock; | |
@end | |
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
protected function getNewBitmap(data:BitmapData):Bitmap | |
{ | |
var horizontalRatio:Number = this.width / data.width; | |
var verticalRatio:Number = this.height / data.height; | |
var ratio:Number = Math.max(horizontalRatio,verticalRatio); | |
var matrix:Matrix = new Matrix(); | |
matrix.scale(ratio,ratio); |
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.DisplayObject; | |
import flash.display.Loader; | |
import flash.display.MovieClip; | |
import flash.display.SWFVersion; | |
import flash.display.Sprite; | |
import flash.display.StageAlign; | |
import flash.display.StageScaleMode; | |
import flash.events.Event; |
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
<?xml version="1.0" encoding="iso-8859-1" ?> | |
<!-- | |
This file provides a convenient mapping of the Flash MX 2004 UnicodeTable.xml character ranges | |
for use in Macromedia Flex's configuration file. You can copy ranges from this reference list and add | |
them to Flex's configuration file. | |
Developers embed fonts into applications as not every client has the same fonts installed. To reduce | |
the size of the application developers often include a subset of the characters available in a font - | |
this subset is known as a character range. |
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
// | |
// CaptureViewController.m | |
// TimeSmear | |
// | |
// Created by Lee Probert on 23/02/2012. | |
// Copyright (c) 2012 LyraSpace Ltd. All rights reserved. | |
// | |
#import "CaptureViewController.h" |
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.cc.eurostarlive.layouts | |
{ | |
import mx.core.ILayoutElement; | |
import mx.core.IVisualElement; | |
import spark.layouts.supportClasses.LayoutBase; | |
public class GridConstraintBasicLayout extends LayoutBase | |
{ | |
/* |
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
<?xml version="1.0" encoding="utf-8"?> | |
<s:Application | |
xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:mx="library://ns.adobe.com/flex/mx" | |
xmlns:loaders="away3d.loaders.*" | |
xmlns:a3d="*" | |
backgroundAlpha="0" |
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
Object.z = Math.round((camera.zoom * camera.focus) -Math.abs(camera.z)) | |
+ Object.depth/2; // take or add 0.5 if it's still blurred |
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
<?xml version="1.0" encoding="utf-8"?> | |
<s:Application | |
xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:mx="library://ns.adobe.com/flex/mx" | |
minWidth="955" | |
minHeight="600" | |
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.cc.math | |
{ | |
/** | |
* Full details: http://gamedev.michaeljameswilliams.com/2009/04/24/angles-in-flash/ | |
* Hungarian notation idea: http://www.joelonsoftware.com/articles/Wrong.html | |
* Optimisation credit: http://www.nbilyk.com/optimizing-actionscript-3 | |
* | |
* Usage: import com.michaeljameswilliams.gamedev.angles.Angle | |
* var degAngle:Number = Angle.degFromRad( radAngle ); |
OlderNewer