Problem with images in storyboard.

Hi there!

I have this problem using storyboards:

I have a menu with a button. If I press it, it sends me to the first level of my game.

When I pass the final level, the game return me to the menu. Bur, if I start playing the first again, my images doesn´t appear.

The images are balls, and to pass the level, you have to eliminate all the balls. To do this, I use:

ball:removeSlef()

ball = nil

But, I don´t think that this is the problem, because I eliminate this lines, and it doesn´t work.

Tha images are create in scene:createScene function, and insert in the Group.

How Can I solve my problem?

Goodbye!

Well we could start with some code examples.  :slight_smile:

I am going to short my code:

http://pastebin.com/PDNhEKJP

Thanks for answering!

Help Please  :frowning:

Try adding this to your enterScene function on the menu (and all other scenes):

[lua]

local ready = function()            – delete the previous scene after short delay

        local previous = storyboard.getPrevious()

        if previous ~= “main” and previous then

            storyboard.removeScene(previous)

        end

end

timer.performWithDelay(200, ready)

[/lua]

Thanks, This work perfectly :smiley:

Well we could start with some code examples.  :slight_smile:

I am going to short my code:

http://pastebin.com/PDNhEKJP

Thanks for answering!

Help Please  :frowning:

Try adding this to your enterScene function on the menu (and all other scenes):

[lua]

local ready = function()            – delete the previous scene after short delay

        local previous = storyboard.getPrevious()

        if previous ~= “main” and previous then

            storyboard.removeScene(previous)

        end

end

timer.performWithDelay(200, ready)

[/lua]

Thanks, This work perfectly :smiley: