MobGUI button to go to next card

This is the place to discuss anything relating to MobGUI

Moderators: heatherlaine, robinmiller, kevinmiller, malte, splash21

Post Reply
benghere
Posts: 14
Joined: Wed Jan 15, 2014 12:33 am

MobGUI button to go to next card

Post by benghere » Thu May 15, 2014 4:08 pm

I have a seemingly strange problem .I use mobgui button to simply go to the next card. It works but it always goes to one particular card (ie that card shows up) before transitioning to the correct card. My stack has about 15 cards and whenever I transition from one card to another this card(in my case card4) shows up before it takes me to the correct card.
I tested with native LC button and it works fine (ie it just goes to the correct card). Thank you.

# MobGUI iOS7 Button Control
on mouseUp
visual effect push left
go to cd "card5"
end mouseUp

# Search for behavior
on preOpenControl
local tBehavior

put the behavior of me into tBehavior
if tBehavior = empty or not exists(tBehavior) then
put format("button \"S21-Button\" of card \"MobGUI\" of stack \"" & the mainStack of this stack & "\"") into tBehavior
if exists(tBehavior) then
set the behavior of me to tBehavior
end if
end if
pass preOpenControl
end preOpenControl

Klaus
Posts: 10477
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: MobGUI button to go to next card

Post by Klaus » Thu May 15, 2014 7:02 pm

Hi benghere,

you need to use the new VISUAL EFFECT syntax or iOS might even crash!

Code: Select all

on mouseUp
  lock screen for visual effect
  go to cd "card5"
  unlock screen with visual effect push left
end mouseUp
Best

Klaus

Post Reply

Return to “MobGUI”