Page 1 of 1
					
				Unlock screen with visual...
				Posted: Sat May 05, 2012 7:32 pm
				by rrBUSS9EE
				Hello Folks,
New to LiveCode. The docs suggest the following will dissolve in btn "guide" but I see no dissolve, it just appears. Can someone tell me what I am missing. (LC 5.5 on Lion)
Code: Select all
on mouseup
   lock screen
   if the vis of btn "guide" then hide btn "guide"
   else show btn "guide"
   unlock screen with visual dissolve open very slowly
end mouseup
 
			 
			
					
				Re: Unlock screen with visual...
				Posted: Sat May 05, 2012 7:59 pm
				by Dixie
				Code: Select all
on mouseUp
   lock screen for visual effect
   if the visible  of button "guide" is true then
      set the visible of button "guide" to false
   else
      set the visible of button "guide" to true
   end if
   unlock screen with dissolve slow
end mouseUp
Dixie
 
			 
			
					
				Re: Unlock screen with visual...
				Posted: Sat May 05, 2012 9:43 pm
				by rrBUSS9EE
				Dixie wrote:lock screen for visual effect
That was the missing little gremlin. Thanks!
 
			 
			
					
				Re: Unlock screen with visual...
				Posted: Sat Aug 18, 2012 2:57 am
				by stephenmcnutt
				My documentation (dictionary) in LiveCode 5.5.1 for Mac OS X tells me this in the "visual effect" entry:
------
Summary: 
Adds a visual effect trasition.
Examples: 
visual effect dissolve
go next card
go next card with visual effect zoom close with sound "Cheers"
on mouseUp
   hide me
   show me with visual effect iris close slowly
end mouseUp
lock screen
   # Do something
unlock screen with visual effect wipe up to black with sound "doom.wav"
----------
But when I try it, the first thing I notice is that LiveCode wants me to put quotes around the effectName--like "dissolve".  
Then I find from this post that I have to use "lock screen for visual effect".
Is there a correct version of the LiveCode dictionary somewhere?
			 
			
					
				Re: Unlock screen with visual...
				Posted: Sat Aug 18, 2012 9:35 am
				by Mark
				Hi,
No, there is no correct version of the LC dictionary somewhere. The "for visual effect" clause was added recently, in 5.0 or 5.0.1.
A quick way to toggle the visibility of a button is:
Code: Select all
set the vis of btn x to not the vis of btn x
Kind regards,
Mark
 
			 
			
					
				Re: Unlock screen with visual...
				Posted: Sat Aug 18, 2012 2:35 pm
				by stephenmcnutt
				Well thanks for that honest reply and for that excellent tip, 
Mark.
			 
			
					
				Re: Unlock screen with visual...
				Posted: Sun Aug 19, 2012 6:00 am
				by jacque
				The documentation is correct as far as I know, and was updated recently for version 5.5.1. The missing piece you're looking for is in the entry for "lock screen", since that's the only time you need to use "for visual effect". A visual effect does not always require locking the screen, so the reference doesn't apply there.
The current documentation was revised recently and all reported omissions or errors were fixed. But if you do find something wrong please let us know and someone can report it. The team is very good about correcting reported omissions.
			 
			
					
				Re: Unlock screen with visual...
				Posted: Sun Aug 19, 2012 8:32 am
				by snm
				Maybe it's good idea to mentioned about "for visual effects" in "lock screen" Dictionary entry (even with the link to it).
Marek
			 
			
					
				Re: Unlock screen with visual...
				Posted: Sun Aug 19, 2012 11:15 am
				by Klaus
				Hi Marek,
snm wrote:Maybe it's good idea to mentioned about "for visual effects" in "lock screen" Dictionary entry (even with the link to it).
It is already there, at least in my dictionary in LC 5.5.1! 
 
Best
Klaus
 
			 
			
					
				Re: Unlock screen with visual...
				Posted: Sun Aug 19, 2012 11:34 am
				by snm
				Hi Klaus,
Sorry, I didn't check it in Dictionary, my fault.
Marek
			 
			
					
				Re: Unlock screen with visual...
				Posted: Sun Aug 19, 2012 4:11 pm
				by stephenmcnutt
				Isn't it wrong in the Visual Effect entry that I quoted above? And what about not having quotes around the effectName in the dictionary? It throws an unquoted literal error.
			 
			
					
				Re: Unlock screen with visual...
				Posted: Mon Aug 20, 2012 3:30 am
				by jacque
				I've never quoted visual effects. Actually, when I first started using MetaCard (LiveCode's precursor) I was told that quoting visual effects would cause an error, which was a hard habit to break after using HyperCard where they were required.
Can you post the line of code in your stack that fails? I've used unquoted visual effects for over 15 years in both desktop and mobile apps. I don't think I've ever used it with a sound though, could that be what causes the problem?