 
     let DEFAULT_BACKGROUND_IMAGE = "2801-11"
     
+    enum direction
+    {
+        case toRight
+        case toLeft
+    }
+    
     var imageBackGround : UIImage!
     var ZERO_TRAILLING_CONSTRAINT : CGFloat!
     var timer1 : NSTimer? = nil
     var FlagPauseAnimation : Bool? = nil
+    var lastPosToReach : CGFloat?
+    var lastDuration : NSTimeInterval?
+    var lastDirection : direction?
+    var secondElapse : Int?
+    var justWakeUp :Bool?
     
 
     @IBOutlet var backgroundImageView: UIImageView!

    func resumeanimation(notification :NSNotification)
    {

        self.backImageTrailingConstraint.constant = ZERO_TRAILLING_CONSTRAINT
        if let letimer = timer1
        {
            if letimer.valid

    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        //Init
        lastPosToReach = -400
        lastDuration = 30.0
        lastDirection = direction.toLeft
        secondElapse = 0
        justWakeUp = false
        
        //set your image
        self.imageBackGround = UIImage(named: DEFAULT_BACKGROUND_IMAGE)
