PDA

View Full Version : 2 CMotion on page placement?



pitschkac
09-20-2006, 08:48 PM
1) Script Title:2 CMotion Image gallery position

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/cmotiongallery.htm

3) Describe problem: I would like to be able to place approximately 5 galleries in a row on my page. I am able to create the galleries just fine, but when I add titles and new layers to my page the galleries just run at the top or wherever I put hard <br> in the html code ( I have them centered through the script). Can I put these in a layer and move them anywhere I choose in a html editor program? When I have tried and then previewed in browser the scripts don't run. I assume it is because the .js file cannot run in an undefined layer? I am a rookie here so any help would be greatly appreciated. Thanks in advance.

Chad

jscheuer1
09-21-2006, 07:49 AM
You seemed to have solved this:

http://www.dynamicdrive.com/forums/showthread.php?p=54079#post54079

But the time stamp on that post is before the one on this post. If you are still having problems, the calls for individual galleries can be in separate script blocks:


<script type="text/javascript">
new cmotiongallery(gallery, 6, 7, 1000, 0, '50%', 225, 'c')
</script><br>
<script type="text/javascript">
new cmotiongallery(gallery2, 6, 7, 1000, 1, '50%', 225, 'c')
</script>

Or, if you want them to touch vertically:


<script type="text/javascript">
new cmotiongallery(gallery, 6, 7, 1000, 0, '50%', 225, 'c')
</script>
<script type="text/javascript">
new cmotiongallery(gallery2, 6, 7, 1000, 1, '50%', 225, 'c')
</script>

Or even:


<script type="text/javascript">
new cmotiongallery(gallery, 6, 7, 1000, 0, '50%', 225, 'c')
new cmotiongallery(gallery2, 6, 7, 1000, 1, '50%', 225, 'c')
</script>

If you want them side by side (don't use percentage width):


<table style="border-collapse:collapse;" cellpadding="0" cellspacing="0">
<tr>
<td><script type="text/javascript">

new cmotiongallery(gallery, 6, 7, 1000, 0, 300, 225, 'c')
</script>
</td>
<td><script type="text/javascript">

new cmotiongallery(gallery2, 6, 7, 1000, 0, 300, 225, 'c')
</script></td>
</tr>
</table>

jscheuer1
09-21-2006, 10:36 AM
I've been playing around with this script a bit more. I never had thought about having two side by side. I found a way where the percentage width can be used. I had to make a minor update to the script motiongallery_oo.js so you should download it again:

http://home.comcast.net/~jscheuer1/side/files/motiongallery_oo.js

This markup (DOCTYPE required) worked well for side by side:


<div style="width:80%;margin:0 auto;"><div style="float:left;width:49%;"><script type="text/javascript">
new cmotiongallery(gallery, 6, 7, 1000, 1, '100%', 227)
</script></div><div style="float:left;width:49%;">
<script type="text/javascript">
new cmotiongallery(gallery2, 6, 7, 1000, 0, '100%', 227)
</script></div></div><div style="clear:left;"></div>

These can also be stacked vertically.