Visual effect question

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
richardmac
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 211
Joined: Sun Oct 24, 2010 12:13 am

Visual effect question

Post by richardmac » Fri Jan 13, 2012 5:19 pm

I want to have three images on a screen dissolve at the same time, but they are not in a group.

In the Dictionary, I find the following:

lock screen
# Do something
unlock screen with visual effect wipe up to black with sound "doom.wav"

OK, so then I tried this:

on mouseUp
lock screen
hide image "object_1"
hide image "object_2"
hide image "object_3"
unlock screen with visual effect dissolve very slow
end mouseUp

The result is that the objects instantly disappear off the screen and there's no visual effect. I'm doing something wrong, but I don't know what. Does anyone have any ideas?

(I know I can put the objects in a group and apply the transition to the group, but I thought the above syntax would work...)

Klaus
Posts: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Visual effect question

Post by Klaus » Fri Jan 13, 2012 6:29 pm

Hi Richard,

looks like we really have to get used to the new syntax! 8)

This works fine with LC >= 5:

Code: Select all

on mouseUp

   ## !
  lock screen for visual effect
  ## !

  if the visible of img "object_1" then
    hide image "object_1"
    hide image "object_2"
    hide image "object_3"
  else
    show image "object_1"
    show image "object_2"
    show image "object_3"
  end if
  unlock screen with visual effect dissolve
end mouseUp
Best

Klaus

richardmac
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 211
Joined: Sun Oct 24, 2010 12:13 am

Re: Visual effect question

Post by richardmac » Sat Jan 14, 2012 1:33 am

Thanks, Klaus! The new syntax makes sense. But... the old, incorrect syntax that I posted was from the Dictionary in LiveCode 5.0.2. Is the Dictionary not updated with new syntax when it changes?

Klaus
Posts: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Visual effect question

Post by Klaus » Sat Jan 14, 2012 12:15 pm

Hi Richard,
Is the Dictionary not updated with new syntax when it changes?
it should be, but obviously isn't sometimes 8)


Best

Klaus

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10058
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Visual effect question

Post by FourthWorld » Sat Jan 14, 2012 5:58 pm

The Dictionary can be amended with user comments. While it would be ideal to have the main entry updated, in the meantime sharing a note there about the new syntax may be helpful.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richardmac
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 211
Joined: Sun Oct 24, 2010 12:13 am

Re: Visual effect question

Post by richardmac » Sun Jan 15, 2012 3:07 pm

FourthWorld wrote:The Dictionary can be amended with user comments. While it would be ideal to have the main entry updated, in the meantime sharing a note there about the new syntax may be helpful.
That's a good point. So last night I created an account and submitted a user comment with details about the new syntax. Of course, now it has to be approved, but after that it will show up.

richardmac
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 211
Joined: Sun Oct 24, 2010 12:13 am

Re: Visual effect question

Post by richardmac » Fri Feb 10, 2012 12:14 pm

Followup - I "added a note" back almost a month ago. Either it was never added, or my Dictionary does not update. Do you have to manually update the Dictionary?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10058
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Visual effect question

Post by FourthWorld » Fri Feb 10, 2012 3:05 pm

Thanks for adding your note to the Dictionary. Not sure why it hasn't shown up yet; may be a known issue with the comments feature that they're working on, but to make sure they're aware of it you may want to submit a report to support [at] runrev.com.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply