 import AppKit
 
 class PreviewLayer: CCNode {
-    var sprite : CCSprite!
+    var previewSprite : CCSprite!
     var viewSize: CGSize
     var effect: CCEffectLighting?
 

        let groups = ["group_name"]
        let light = CCLightNode(type: CCLightType.Point, groups: groups,
            color: CCColor.whiteColor(), intensity: 0.5)
        light.position.x = sprite.contentSize.width / 2.0
        light.anchorPoint = CGPointMake(0.5, 0.5)

        let lightContainer = CCNode()
        lightContainer.position = CGPointMake(
            sprite.contentSize.width/2, sprite.contentSize.height/2)

        lightContainer.addChild(light)

        sprite.addChild(lightContainer)

        let sunIcon: CCSprite = CCSprite(imageNamed: "light64.png")
        sunIcon.contentSize = CGSizeMake(32.0, 32.0)

        viewSize = CCDirector.sharedDirector().viewSize()
        super.init()
        userInteractionEnabled = true
        initializeLayer()
        addRotatingLight()
        initializeStaticExample()
    }

    class func spriteFrameForImage(image : NSImage) -> CCSpriteFrame! {
        let source = CGImageSourceCreateWithData(image.TIFFRepresentation, nil)
        let img = CGImageSourceCreateImageAtIndex(source, 0, nil)

