You don't need to turn the current version into a plugin. As I explained in my previous post, it already is a plugin. You can set anything you need to in the new fall_rise() call. But, if you must layer another plugin on top of it, you can. You can do things like (see the highlighted line):
You don't need:Code:/* Inspired by Autumn leaves- by Kurt Grigg (kurt.grigg@virgin.net)
* Modified by Dynamic Drive for NS6 functionality
* visit http://www.dynamicdrive.com for the original script
* Modified by jscheuer1 in http://www.dynamicdrive.com/forums
* 01/11 for optional direction, allow effect to
* work fully on wide pages, to not create 'dancing scrollbars' on small
* pages & use jQuery methods. Requires standards mode DOCTYPE
* tested in all current version major browsers including IE 8 & IE 9 Beta. */
/* Updated further 10/13 to allow for stop and start and multiple usage per page, adds preload confirmation before start */
function rise_fall(opts){
this.init(opts);
}
(function($){
rise_fall.prototype = {
defaults: { //these items may be set in the on page call
dir: proboards.plugin.get('falling_images').settings.fall_direction, // Set the direction (1 for down, -1 for up)
speed: 20, // 12 to whatever (60 is pretty slow) higher numbers are slower
Amount: 18, // Smoothness depends on image file size, the smaller the size the more you can use!
sway: 6, // Set amount of left/right swaying of objects (default = 10), higher numbers produce more sway
zIndex: 1, // Set z-index value for image overlay
//Pre-load your image(s) below! 6 is an optimal number for variety. Use just one for uniformity.
grphcs: [
"al.gif",
"bl.gif",
"cl.gif",
"dl.gif",
"el.gif",
"fl.gif" //<-- no trailing comma after last image
]
},
Because the script does that itself now, even delaying the onset of the effect until the images load (or error in the case of a missing image or images). I see you have a large if/else if/else thing there for the images starting with:Code:proboards.preload(grphcs);
Although there are more efficient and wiser ways to do that, you can keep that exactly how it is. Do it before the code at the top of this post, and when you get to the grphcs section of it do (again, see the highlighted line):Code:var grphcs = new Array(6);
Hopefully you are getting the picture, I don't want to have to rewrite your plugin completely to use the latest code. But if you have more questions about how to get a specific value into the latest code, feel free to ask.Code:(function($){
rise_fall.prototype = {
defaults: { //these items may be set in the on page call
dir: proboards.plugin.get('falling_images').settings.fall_direction, // Set the direction (1 for down, -1 for up)
speed: 20, // 12 to whatever (60 is pretty slow) higher numbers are slower
Amount: 18, // Smoothness depends on image file size, the smaller the size the more you can use!
sway: 6, // Set amount of left/right swaying of objects (default = 10), higher numbers produce more sway
zIndex: 1, // Set z-index value for image overlay
//Pre-load your image(s) below! 6 is an optimal number for variety. Use just one for uniformity.
grphcs: grphcs
},
Just remember, if you're setting everything via the defaults property, when you finally get to the new fall_rise() call, leave it empty:
Otherwise, anything that's left in there will override what gets set in the defaults.Code:leaves = new fall_rise();

