Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Hello world!

Wouter wouterds

:octocat:
Hello world!
View GitHub Profile
@wouterds
wouterds / SlidesContainer.as
Created Nov 30, 2012
Move anchor point to center
View SlidesContainer.as
slide = new Slide(appModel.currentSlide);
slide.x = slide.pivotX = slide.width * .5;
slide.y = slide.pivotY = slide.height * .5;
View gist:4175084
function sleep(ms:int):void {
var init:int = getTimer();
while(true) {
if(getTimer() - init >= ms) {
break;
}
}
}
@wouterds
wouterds / PhotoSelector.as
Created Dec 8, 2012
[PhotoBooth vb] Buttons aanmaken
View PhotoSelector.as
previousButton = new PreviousButton();
addChild(previousButton);
@wouterds
wouterds / PreviousButton.as
Created Dec 8, 2012
[PhotoBooth vb] PreviousButton
View PreviousButton.as
/**
* Created with IntelliJ IDEA.
* User: wouter
* Date: 09/10/12
* Time: 19:09
* To change this template use File | Settings | File Templates.
*/
package be.devine.cp3.photobooth.view {
import be.devine.cp3.photobooth.Library;
@wouterds
wouterds / Library.as
Created Dec 8, 2012
[PhotoBooth vb] Embedded images
View Library.as
/**
* Created with IntelliJ IDEA.
* User: wouter
* Date: 09/10/12
* Time: 18:52
* To change this template use File | Settings | File Templates.
*/
package be.devine.cp3.photobooth {
public class Library {
@wouterds
wouterds / IconButton.as
Created Dec 8, 2012
[PhotoBooth vb] IconButton, de button parent die van SPrite extend
View IconButton.as
/**
* Created with IntelliJ IDEA.
* User: wouter
* Date: 09/10/12
* Time: 19:11
* To change this template use File | Settings | File Templates.
*/
package be.devine.cp3.photobooth.view {
import flash.display.DisplayObject;
import flash.display.Sprite;
@wouterds
wouterds / AppModel.as
Created Dec 9, 2012
Vb navigation via AppModel
View AppModel.as
/**
* Created with IntelliJ IDEA.
* User: WouterDS
* Date: 19/11/12
* Time: 23:43
* To change this template use File | Settings | File Templates.
*/
package be.wouterds.cubetester.model {
import flash.events.Event;
import flash.events.EventDispatcher;
@wouterds
wouterds / gist:4306113
Created Dec 16, 2012
Centeren nativeWindow
View gist:4306113
stage.nativeWindow.x = (Screen.mainScreen.bounds.width - stage.nativeWindow.width) * .5;
stage.nativeWindow.y = (Screen.mainScreen.bounds.height - stage.nativeWindow.height) * .5;
View gist:4316802
// Embedding
[Embed(source="/../media/fonts/DINPro-Medium.otf", embedAsCFF="false", fontFamily="DinProMedium")]
public static const DinProMedium:Class;
[Embed(source="/../media/fonts/OpenSans-Regular.ttf", embedAsCFF="false", fontFamily="OpenSansRegular")]
public static const OpenSansRegular:Class;
[Embed(source="/../media/fonts/OpenSans-Semibold.ttf", embedAsCFF="false", fontFamily="OpenSansSemibold")]
// Usage
Config.OpenSansRegular;
View HomeController.php
$data = array(
'Author' => array(
'ip' => $ip,
'ua' => $ua
)
);
if($this->Author->save($data))
debug('SAVED NEW AUTHOR');
else