Can i apply multiple effects on an object?

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
kingoftnt10
Posts: 8
Joined: Fri Apr 23, 2021 3:38 pm

Can i apply multiple effects on an object?

Post by kingoftnt10 » Wed May 19, 2021 8:13 pm

basically, I want to make an effect for a text like those popups for points and stuff
they would show (with effect dissolve if we are talking LiveCode) go up at the same time and disappear again with effect dissolve i can do all those things with the visual effects BUT I cant do them at the same time

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

Re: Can i apply multiple effects on an object?

Post by Klaus » Wed May 19, 2021 9:05 pm

Visual effects can only be applied to static objects, means you cannot use an effect with a moving object.
Maybe you can "fake" this by setting the blendlevel in a repeat loop?

kingoftnt10
Posts: 8
Joined: Fri Apr 23, 2021 3:38 pm

Re: Can i apply multiple effects on an object?

Post by kingoftnt10 » Thu May 20, 2021 7:21 am

basically, I wanted to do dissolve with push up and then hide it with dissolve again is it possible to apply multiple effects on an object it won't move the moving is because of the effect (push up)

I might try your idea

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Can i apply multiple effects on an object?

Post by jmburnod » Thu May 20, 2021 10:09 am

Hi,
I played with visual effect.
I believe I don't understand correctly
dissolve with push up and then hide it with dissolve
This script display an hide/show with two visuals (push up and dissolve. It is not exactly what you want (the inverse maybe)

Code: Select all

on mouseup
   put the rect of btn 1 into tRect
   lock screen for visual effect in rect tRect
   hide btn 1
   unlock screen with visual effect "push up" slow
   lock screen for visual effect in rect tRect
   show btn 1
   unlock screen with visual effect "dissolve"
end mouseup
Best regards
Jean-Marc
https://alternatic.ch

kingoftnt10
Posts: 8
Joined: Fri Apr 23, 2021 3:38 pm

Re: Can i apply multiple effects on an object?

Post by kingoftnt10 » Thu May 20, 2021 11:32 am

I'm not an animator but I made this example

Something like that
Attachments
Anim.gif

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Can i apply multiple effects on an object?

Post by jmburnod » Thu May 20, 2021 1:27 pm

OK
For this case you may use klaus's work around with blendlevel.
Jean-Marc
https://alternatic.ch

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

Re: Can i apply multiple effects on an object?

Post by Klaus » Thu May 20, 2021 1:59 pm

Here a quick and dirty demo! :-)
Attachments
move_fade_in_out.livecode.zip
(1.2 KiB) Downloaded 243 times

kingoftnt10
Posts: 8
Joined: Fri Apr 23, 2021 3:38 pm

Re: Can i apply multiple effects on an object?

Post by kingoftnt10 » Thu May 20, 2021 8:55 pm

That's almost exactly what I want just 2 things can u please make it fade in when shown and make it go up relative to the position of the object? so I don't have to change the code? I just didn't really understand how the code works

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7214
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Can i apply multiple effects on an object?

Post by jacque » Fri May 21, 2021 7:38 pm

Is this what you want?

Code: Select all

  put the loc of btn 1 into tOldLoc
  lock screen for visual effect in rect (the rect of btn 1)
  show btn 1
  unlock screen with visual effect dissolve
  move btn 1 relative 0,-100 in .5 seconds
  lock screen for visual effect in rect (the rect of btn 1)
  hide btn 1
  unlock screen with visual effect dissolve
  set the loc of btn 1 to tOldLoc
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

andresdt
Posts: 146
Joined: Fri Aug 16, 2019 7:51 pm

Re: Can i apply multiple effects on an object?

Post by andresdt » Fri May 21, 2021 10:13 pm

Hi, I wonder why you don't use the animationEngine?

https://github.com/derbrill/animationEngine
https://livecode.com/extensions/animati ... e-5/6-0-0/

Code: Select all

on preOpenCard
   -- Reset Loc
    set the top of field 1 to the bottom of this cd
end preOpenCard

on openCard
    aeFadeIn the long ID of  field 1,900
    aeMoveTo the long ID of field 1,the loc of this cd,1000,"overshoot"    
end openCard

Post Reply

Return to “Multimedia”