Page 1 of 1

FadeObject()

PostPosted: Thu Dec 10, 2015 11:44 pm
by Kataleena
Hi,

I have been trying to use fadeobject(), to fade out to an image that is already visible, only once. Is this possible as I cant seem to get it to work.

Thanks Kate

Re: FadeObject()

PostPosted: Fri Dec 11, 2015 12:15 am
by Clifton
The PowerPac function fadeObject() is able to do a lot of complex things, so it can seem a little confusing at first to set this up.

Here is an example of your scenario.
  1. I drew a rectangle and named it in this case "FadeME"
  2. For the onclick event I set the PowerPac function fadeObject() to execute with the following parameters:
    Image 1.png
    FadeObject() parameters to fade object OUT.
    Image 1.png (97.77 KiB) Viewed 7700 times
  3. Now export the page and view it in a browser. Clicking on the rectangle will cause it to fade out over a period of 2500ms. Works perfect.
There are other ways to fade out an object. You can use pgAnimateCSS() to perform the fade as well. It is your choice which function to use as they each have their pros and cons. pgAnimateCSS() allows a greater array of routines while fadeObject() is far more flexible in controlling the timing and result (e.g.: you can even stop the fade at a certain opacity). Both PowerPac functions, fadeObject() and pgAnimateCSS(), provide notification when they have completed. And both functions support groups of objects.

ENJOY!

Re: FadeObject()

PostPosted: Fri Dec 11, 2015 12:47 am
by Kataleena
Once again, thanks for your fast reply. Got it working!

Kate