FadeObject()

Help for using specific functions

FadeObject()

Postby Kataleena » Thu Dec 10, 2015 11:44 pm

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
Kataleena
 
Posts: 49
Joined: Sun Feb 23, 2014 10:05 pm

Re: FadeObject()

Postby Clifton » Fri Dec 11, 2015 12:15 am

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 7625 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!
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: FadeObject()

Postby Kataleena » Fri Dec 11, 2015 12:47 am

Once again, thanks for your fast reply. Got it working!

Kate
Kataleena
 
Posts: 49
Joined: Sun Feb 23, 2014 10:05 pm


Return to Function Help

Who is online

Users browsing this forum: No registered users and 3 guests

cron