Reloading scene

Hi Geeks,

On an event, I want to reload the same scene , my global variables will make sure that corresponding display objects are updated. For some reason reload scene doesnt work

This seems to work in reloading scene… 

–on a event.

storyboard.purgeScene(“thisScene”)

storyboard.gotoScene("thisScene,“zoomIn”,1000)

BUT, the effects are never there… i tried all the effects and the time… its just the fade effect and same time for whatever I use…

Am I doing anything wrong ?

regards,

Joel

storyboard.gotoScene(“thisScene”, {effect = “zoomIn”, time = 1000})

I did try that. doesnt work… :frowning:

Okay,

open up “thisScene” and go to the createScene function.

all of your different images and variables are there.

at the top of the create scene function enter this line:

screenGroup = self.view  

now under each variable that you finish writing insert this line:

screenGroup:insert(VariableName)  

so each variable will look a little like this:

background = display.newImage("bg\_final.png") background.anchorX = 0 background.anchorY = 0 background.x = 0 background.y = 0 screenGroup:insert(background)  

now add this:

zoomineffect = { effect="zoomin", time=1000 } storyboard.gotoScene("thisScene", zoomineffect)  

give me a shout if that doesn’t work may be able to help you out more.

James

Actually I just checked there is no “zoomIn” effect. This are the possible values:

fade
    zoomOutIn
    zoomOutInFade
    zoomInOut
    zoomInOutFade
    flip
    flipFadeOutIn
    zoomOutInRotate
    zoomOutInFadeRotate
    zoomInOutRotate
    zoomInOutFadeRotate
    fromRight (over original scene)
    fromLeft (over original scene)
    fromTop (over original scene)
    fromBottom (over original scene)
    slideLeft (pushes original scene)
    slideRight (pushes original scene)
    slideDown (pushes original scene)
    slideUp (pushes original scene)
    crossFade

I suggest you use “zoomOutIn”

storyboard.gotoScene(“thisScene”, {effect = “zoomIn”, time = 1000})

I did try that. doesnt work… :frowning:

Okay,

open up “thisScene” and go to the createScene function.

all of your different images and variables are there.

at the top of the create scene function enter this line:

screenGroup = self.view  

now under each variable that you finish writing insert this line:

screenGroup:insert(VariableName)  

so each variable will look a little like this:

background = display.newImage("bg\_final.png") background.anchorX = 0 background.anchorY = 0 background.x = 0 background.y = 0 screenGroup:insert(background)  

now add this:

zoomineffect = { effect="zoomin", time=1000 } storyboard.gotoScene("thisScene", zoomineffect)  

give me a shout if that doesn’t work may be able to help you out more.

James

Actually I just checked there is no “zoomIn” effect. This are the possible values:

fade
    zoomOutIn
    zoomOutInFade
    zoomInOut
    zoomInOutFade
    flip
    flipFadeOutIn
    zoomOutInRotate
    zoomOutInFadeRotate
    zoomInOutRotate
    zoomInOutFadeRotate
    fromRight (over original scene)
    fromLeft (over original scene)
    fromTop (over original scene)
    fromBottom (over original scene)
    slideLeft (pushes original scene)
    slideRight (pushes original scene)
    slideDown (pushes original scene)
    slideUp (pushes original scene)
    crossFade

I suggest you use “zoomOutIn”