Storyboard Graphics Trouble

Hello everyone! I’ve used director in all my previous apps (it’s been awesome), but recently I decided to move on to storyboard. In the process of learning its ways, I’ve come across an issue. :stuck_out_tongue: My graphics from “scene2” are showing up in “scene1” on top of scene1’s graphics. I hope I’m just missing something simple…

Here is what I’ve got goin’ on… It’s simplified, yet it still creates the problem.
[lua]–scene 2

local storyboard = require( “storyboard” )
local scene = storyboard.newScene()

local bob

function scene:createScene( event )
local screenGroup = self.view

bob = display.newRect( 0, 0, 0, 0 )
screenGroup:insert(bob)
bob.width = 300
bob.height = 300

end

scene:addEventListener( “createScene”, scene )

return scene

–bob shows up in “scene1” and “scene2.”[/lua]

So, what am I missing or doing wrong?
Thanks! [import]uid: 39302 topic_id: 30949 reply_id: 330949[/import]

I think it should work in createScene OR enterScene.

I’m not sure you’ve given enough code to discover the problem. How are you calling scene 2? What happens first in scene 1, etc.?

For example, if you don’t put scene 1 graphics into the storyboard view, when you switch to scene 2 they’ll still be on the screen.

Can you include stripped down versions of your main.lua and screen 1 code?

Jay [import]uid: 9440 topic_id: 30949 reply_id: 123783[/import]

Thanks, Mr. Whye. I was looking at my code to create a “stripped down” version when I realized I was calling scene2 with gotoScene in the middle of nowhere. So, I got rid of that, and now it’s working as expected! My bad…

btw: I started using CPM a couple weeks ago, and I’m seriously enjoying it! Thanks for that… :slight_smile:

Thanks!
Nathan [import]uid: 39302 topic_id: 30949 reply_id: 123814[/import]

– não posto mais aqui.

[import]uid: 89165 topic_id: 30949 reply_id: 123782[/import]

I think it should work in createScene OR enterScene.

I’m not sure you’ve given enough code to discover the problem. How are you calling scene 2? What happens first in scene 1, etc.?

For example, if you don’t put scene 1 graphics into the storyboard view, when you switch to scene 2 they’ll still be on the screen.

Can you include stripped down versions of your main.lua and screen 1 code?

Jay [import]uid: 9440 topic_id: 30949 reply_id: 123783[/import]

Thanks, Mr. Whye. I was looking at my code to create a “stripped down” version when I realized I was calling scene2 with gotoScene in the middle of nowhere. So, I got rid of that, and now it’s working as expected! My bad…

btw: I started using CPM a couple weeks ago, and I’m seriously enjoying it! Thanks for that… :slight_smile:

Thanks!
Nathan [import]uid: 39302 topic_id: 30949 reply_id: 123814[/import]

– não posto mais aqui.

[import]uid: 89165 topic_id: 30949 reply_id: 123782[/import]