title: Spawn SKSprite at random positions
body: <p>I am making a game and I need the "frowny" to spawn at random positions on the screen then fall through. </p>
  
  <p>I have it spawning but its only in one section and it won't spawn anywhere else:</p>
  
  <pre><code>}
  
  func random() -&gt; CGFloat {
      return CGFloat(Float(arc4random()) / 0xFFFFFFFFFFFFF)
  }
  
  func random(#min: CGFloat, max: CGFloat) -&gt; CGFloat {
      return random() * (max - min) + min
  }
  
  func addFrowny() {
  
      let frowny = SKSpriteNode(imageNamed: "Frowny")
  
      let actualX = random(min: frowny.size.width/2, max: size.width + frowny.size.height/2)
  
      frowny.position = CGPoint(x: actualX, y: size.width - frowny.size.height/2)
  
      addChild(frowny)
  
  
      let actualDuration = random(min: CGFloat(2.0), max: CGFloat(4.0))
  
  
      let actionMove = SKAction.moveTo(CGPoint(x: actualX, y: +frowny.size.height/2), duration: NSTimeInterval(actualDuration))
      let actionMoveDone = SKAction.removeFromParent()
      frowny.runAction(SKAction.sequence([actionMove, actionMoveDone]))
  </code></pre>