Animation Effect on Group.

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Googie85
Posts: 226
Joined: Tue Aug 05, 2014 10:07 am

Animation Effect on Group.

Post by Googie85 » Tue Jul 15, 2025 5:19 am

Hii Guys!

I am animating a group as a visual effect and have the following code,

on Animate
hide me
show me with visual effect "dissolve" close very fast
end Animate

It works fine, it "fades" in, but I also want to "fade" it out. I have searched the relevant information in the dictionary but I am unable to find a way to fade the group out.

Any help is greatly received!

Googie.

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

Re: Animation Effect on Group.

Post by Klaus » Tue Jul 15, 2025 8:54 am

Hi Googie85,

please use the CODE tags above after pasting your script(s): </>
That way the formatting will be preserved, see below.

1. DISSOLVE does NOT need the extra parameter "close" or "open"!
2. Use the example in the divtionary below the one you used for hiding the image. :-)

Code: Select all

on show_the_image
    lock screen for visual effect
    show image "your imagename here" 
    unlock screen with visual effect "dissolve" very fast
on show_the_image
This will also work for HIDEing your image, maybe get used to thie more universal syntax.

Best

Klaus

Googie85
Posts: 226
Joined: Tue Aug 05, 2014 10:07 am

Re: Animation Effect on Group.

Post by Googie85 » Tue Jul 15, 2025 9:19 am

Hii Klaus,

Thanks for your informative reply! I have this:

Code: Select all

on Animate
   if the visible of group "Review" = true then
      lock screen for visual effect
      set the visible of group "Review" to false
      unlock screen with visual effect "dissolve" very fast
   else
         lock screen for visual effect
  set the visible of group "Review" to true
   unlock screen with visual effect "dissolve" very fast
   end if
end Animate
I am not getting the desired result. Am I reading your reply wrong?

Thanks,

Googie.

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

Re: Animation Effect on Group.

Post by Klaus » Tue Jul 15, 2025 9:31 am

Hi Googie,

just tested the script here with an example group named "review" and works as exspected!?
You can also save some typing:

Code: Select all

on animate
   lock screen for visual effect
   if the visible of group "Review" = true then
      set the visible of group "Review" to false
   else
      set the visible of group "Review" to true
   end if
   unlock screen with visual effect "dissolve" very fast
end animate
Best

Klaus

Googie85
Posts: 226
Joined: Tue Aug 05, 2014 10:07 am

Re: Animation Effect on Group.

Post by Googie85 » Tue Jul 15, 2025 10:18 am

Got it! Thanks again Klaus!

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

Re: Animation Effect on Group.

Post by Klaus » Tue Jul 15, 2025 10:47 am

Great! :-)
You could even leave out the IF THEN clause:

Code: Select all

on animate
   lock screen for visual effect
   set the visible of group "Review" to NOT (the visible of grp "Review")
   unlock screen with visual effect "dissolve" very fast
end animate
:-)

Post Reply