title: Node and Button Scaling - Touches Began, Touches Moved, Touches Ended
body: <p>Like many other apps i have found on the app store when you touch a button it scales in some way, whether it gets bigger or smaller. I want to achieve this using <code>SpriteKit</code> nodes and the <code>SKAction</code>; <code>scaleTo</code>. This is what i have got so far.</p>
  
  <pre><code>import SpriteKit
  
  class GameEndedScene: SKScene {
  
  let scaleIn = SKAction.scaleTo(1.5, duration: 0.2)
  let scaleOut = SKAction.scaleTo(1.0, duration: 0.2)
  
  override func didMoveToView(view: SKView) {
      /* Setup your scene here */
      var playButton = SKSpriteNode()
      var shareButton = SKSpriteNode()
  
      playButton.size = CGSizeMake(100, 100)
      shareButton.size = CGSizeMake(100, 100)
  
      playButton.position = CGPointMake(self.frame.midX, self.frame.midY + 100)
      shareButton.position = CGPointMake(self.frame.midX, self.frame.midY - 100)
  
      playButton.color = UIColor.whiteColor()
      shareButton.color = UIColor.whiteColor()
  
      playButton.name = "Scale"
      shareButton.name = "Scale"
  
      addChild(playButton)
      addChild(shareButton)
  }
  
  override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
      for touch: AnyObject in touches {
          let location = touch.locationInNode(self)
          let node: SKNode = nodeAtPoint(location)
  
          if node.name == "Scale" {
              node.runAction(scaleIn)
          }
      }
  }
  
  override func touchesMoved(touches: NSSet, withEvent event: UIEvent) {
  
  }
  
  override func touchesEnded(touches: NSSet, withEvent event: UIEvent) {
      for touch: AnyObject in touches {
          let location = touch.locationInNode(self)
          let node: SKNode = nodeAtPoint(location)
  
          if node.name == "Scale" {
              node.runAction(scaleOut)
          }
      }
  }
  </code></pre>
  
  <p>The scaling works perfectly fine in the <code>touchesBegan</code> And <code>touchesEnded</code> but i want the user to be able to move the touch and if it begins to touch a new node that is also under the name "Scale" i want it to have the same affect as Touches Began, And if touch moves away from the node i want it to have the same affect as <code>touchesEnded</code>. Thank you for any help, sorry for the lack of detail before as it was 3:00 am.</p>