Edit: This post has been changed to reflect a new version of the OO script, check the time stamp below this post to make sure you are using the version in effect when the edit to this post was made.
Well, I was wondering about that. I hadn't really looked at your page in detail, not enough to know for sure if that would be an issue, but I had my suspicions - if only because it looked like you were trying to run two CMotion II galleries on the one page. But I figured you might already have that part worked out.
Anyways, the best approach would be an Object Oriented version. I have one here (demo page):
http://home.comcast.net/~jscheuer1/side/cmotion2_oo.htm
script:
http://home.comcast.net/~jscheuer1/s...gallery2_oo.js
css style:
http://home.comcast.net/~jscheuer1/s...ystyle2_oo.css
There are a few differences - in no particular order:
- The CSS uses classes for efficiency.
- The markup only has an id for the main container, each gallery must have a separate unique id.
- Setting the individual characteristics for a given gallery is now done as properties of an object, rather than as global variables for the non-Object Oriented version.
You can see all of this in the various files. Now, I've initialized my two galleries automatically onload. But you cannot do that, you will run into the same problem you were having with the non-OO version. However, you should be able to add the noload property to your gallery object(s) and then simply change:
Code:
new Effect.Appear('Gallery1', { delay: 0.5, afterFinish: fillup });
and similar to:
Code:
new Effect.Appear('Gallery1', { delay: 0.5, afterFinish: CMotionII.gals.g1.load });
I've set each gallery to only be able to be loaded once (this may be overridden if needed, but should be good for your your application of this script), so you must remove/disable the above onload function.
Any questions, let me know.
Bookmarks