REQ: Fade from one screen to another

Hi Ricardo,

thought I’d initiate the new forum by asking when the new fade feature will be available. It’s the last thing I want to add to my app before I release it.

Thanks as ever!

[import]uid: 9371 topic_id: 5150 reply_id: 305150[/import]

Hi dweezil,

Try to put this into Director class at changeScene function:

[code]

– EFFECT: Crossfade

elseif effect == “crossfade” then

nextView.x = display.contentWidth
nextView.y = 0

loadScene (nextScene)

nextView.alpha = 0
nextView.x = 0

showFx = transition.to ( nextView, { alpha=1, time=fxTime } )

timer.performWithDelay( fxTime, fxEnded )
[/code] [import]uid: 8556 topic_id: 5150 reply_id: 17040[/import]

Genius!

Thanks Richrado, you’re the man!

I trust this will be included in v1.2 also?

Thanks again. [import]uid: 9371 topic_id: 5150 reply_id: 17043[/import]

Sure that! If you have other ideas for new effects, tell me and I’ll try to create them. [import]uid: 8556 topic_id: 5150 reply_id: 17045[/import]

I still think the moveFromTop is ‘broken’, it doesn’t show the outgoing screen, it seems to blank it first…

 -----------------------------------  
 -- EFFECT: Move From Top  
 -----------------------------------  
  
  
 elseif effect == "moveFromTop" then  
  
 nextView.x = 0  
 nextView.y = display.contentHeight\*-1  
 --  
 loadScene (nextScene)  
 --  
 showFx = transition.to ( nextView, { y=0, time=fxTime } )  
 showFx = transition.to ( currentView, { y=display.contentHeight, time=fxTime } )  
 --  
 timer.performWithDelay( fxTime, fxEnded )  

[import]uid: 9371 topic_id: 5150 reply_id: 17047[/import]

Just curious, has anybody tried this “crossfade” or similar transition on an actual device? I had been working on my own version to add to Director but I’ve put it aside for the moment. Basically, I’m concerned about how greedy a cross-fade will be on the GPU of these little pocket devices… it’s one thing to fade a small object, character, line of text, etc. but when it’s two full screens fading into each other, that might cause the device to stumble a bit as it processes the full alpha blending of millions of pixels over the the course of a few seconds. I haven’t done any testing on this, so it might be totally smooth and clean, but my guess is that “movement” transitions (slides, flips, etc.) will be much less taxing on the GPU.

Brent
[import]uid: 9747 topic_id: 5150 reply_id: 17107[/import]

Works fine on my iPhone 4, in fact I’ll go one step further, IRS super duper smooth! [import]uid: 9371 topic_id: 5150 reply_id: 17150[/import]