     {
         println("-> animation for 1 second")
 
-        
-        self.backImageTrailingConstraint.constant = -400
-        
-        UIView.animateWithDuration(30.0
+        var duration = lastDuration
+        
+//        lastPosToReach = -400
+//        lastDuration = 40.0
+//        lastDirection = direction.toLeft
+        
+        if self.secondElapse == 0
+        {
+            self.backImageTrailingConstraint.constant = lastPosToReach!
+            duration = 40.0
+            //reset memory
+            //self.secondElapse = 0
+            
+        }
+        else
+        {
+            if self.secondElapse! > 0
+            {
+                
+                if self.secondElapse! == 40
+                {
+                    self.backImageTrailingConstraint.constant = CGFloat(10 * (40 - 0))
+                    duration = NSTimeInterval(40 - 0)
+                }
+                else
+                {
+                    self.backImageTrailingConstraint.constant = CGFloat(10 * (40 - self.secondElapse!))
+                    duration = NSTimeInterval(40 - self.secondElapse!)
+                    
+                }
+         
+
+            }
+            else
+            {
+                self.backImageTrailingConstraint.constant = ZERO_TRAILLING_CONSTRAINT
+                duration = NSTimeInterval(40 - 0)
+//                self.backImageTrailingConstraint.constant = lastPosToReach!
+//                duration = 40.0
+            }
+ 
+            //reset memory
+            //self.secondElapse = 0
+        }
+        
+        //self.backImageTrailingConstraint.constant = lastPosToReach!
+        
+        //self.backImageTrailingConstraint.constant = -400
+        
+        println("Objectif : \(self.backImageTrailingConstraint.constant)" +
+                            "Pour une duree : \(duration)")
+        
+        justWakeUp = false
+        UIView.animateWithDuration(duration!
             , delay: 0.0
             , options: UIViewAnimationOptions.Repeat | UIViewAnimationOptions.Autoreverse
             , animations:


    let DEFAULT_BACKGROUND_IMAGE = "2801-11"
    
    var imageBackGround : UIImage!
    var ZERO_TRAILLING_CONSTRAINT : CGFloat!
    var timer1 : NSTimer? = nil
    var FlagPauseAnimation : Bool? = nil
    

    @IBOutlet var backgroundImageView: UIImageView!

                self.view.alpha = 1.0
            },
            completion: { finished in
                self.secondElapse = self.secondElapse! + 1
                self.lastPosToReach = self.backImageTrailingConstraint.constant
                println("      ... 1 sec elapsed" + "\ncurrent position : \(self.lastPosToReach)\n\n")
                
            }
        )
        
    }
    
    func PauseLayer(layer: CALayer)
