Objects added into the scene's group disappear.

https://gist.github.com/2394101

So I’m using what you see in the gist above. If you run that, everything seems to run ok, but there should be a rect that shows up in the players scene. If I remove adding it to the scene’s group, it shows up fine. Anything I add into the scene’s group just disappears. any help? [import]uid: 142165 topic_id: 24899 reply_id: 324899[/import]

If i understand you correctly I think you need to do this.
add the rect to the players group then the players group to the scene goup.

Good luck.

function scene:createScene( event ) local group = self.view local players = display.newGroup() --players.x = 25 --players.y = 65 rect = display.newRect(group, 30, 30, 200, 200) rect:setFillColor(200,200,200) players:insert(rect) group:insert(players) end [import]uid: 11860 topic_id: 24899 reply_id: 101050[/import]

Ignore the players stuff for now, it’s irrelevant to the storyboard issue. The code in the gist doesn’t work (when I think it should.) The rect shows up when I change it to:

rect = display.newRect(30, 30, 200, 200)

so not adding it to the scene’s stage, but disappears when I do. [import]uid: 142165 topic_id: 24899 reply_id: 101098[/import]

  1. In the sample, you need to say this in main.lua:
local storyboard = require("storyboard")
  1. In the sample, you use ’ instead of " in the storyboard.gotoScene() code.

  2. If you fix both of those problems I’m seeing the rect whether you insert it into the group or not.

  3. While doubleslashdesign’s idea is not particularly harmful it doesn’t particularly help because it’s actually inserting into “group” twice. [import]uid: 41884 topic_id: 24899 reply_id: 102753[/import]