playing with transitions

is there an edited transition effect that can simulate a page flip? overFromLeft is pretty close, i was wondering if there was one for the right. i’m EXTREMELY new to lua and the director class, as in i just downloaded it 2 days ago and i never programmed in this language ever :stuck_out_tongue: [import]uid: 82086 topic_id: 13532 reply_id: 313532[/import]

hi clints111,

try overFromRight…

if you open the director.lua and do a search for “-- Effect” you’ll find all the transitions that director has:
moveFromRight, overFromRight, moveFromLeft, overFromLeft, moveFromTop, overFromTop, moveFromBottom, overFromBottom, crossfade, fade, Flip, downFlip

(I think that’s all of them) [import]uid: 74346 topic_id: 13532 reply_id: 49686[/import]

hi dav
thanks for the reply. do you know how to edit overfromright? thats wat im currently using, but it doesnt look like a book flip, since the next screen enters over the current. id like to have it as the next screen is under the current screen and the current screen is the one that will transition either right or left. [import]uid: 82086 topic_id: 13532 reply_id: 49696[/import]

hi clints111,

I have not tried to edit the effects of director so off the bat I can’t really say… but I guess another work around is to put all your display objects for the current and next screens into separate groups and then transition the current screen to the right or left:

[lua]transition.to(CurrentScreenGroup, {x=-320})[/lua] [import]uid: 74346 topic_id: 13532 reply_id: 49703[/import]

hi dav
would i put that in the director.lua or the main.lua? [import]uid: 82086 topic_id: 13532 reply_id: 49712[/import]

main.lua file where your display objects are.

Here’s a sample:

[lua]–Dimensions
local _W = display.contentWidth
local _H = display.contentHeight

–Create display objects
local circle01 = display.newImage(“circle01.png”)

local BG = display.newImageRect(“BG.jpg”,_W,_H)
BG:setReferencePoint(display.TopLeftReferencePoint)
BG.x = 0; BG.y = 0

–Create display group
local group01 = display.newGroup()

–Add items to groups
group01:insert(BG)
group01:insert(circle01) --note since circle01 was inserted in group01 after BG, circle01 will display above BG

–Transition
transition.to(group01, {time = 2000, x=-_W}) --move the group to the right by a distance of the width[/lua]

Regarding what I said earlier, you don’t have to put display objects for the next screen into it’s own group, unless you want to move that screen too.

Hope that helps,
d [import]uid: 74346 topic_id: 13532 reply_id: 49719[/import]