Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 03-29-2012, 02:46 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 84,234
SilverDragonTears is on a distinguished road
Default Javascript question

Can anyone familiar with javascript tell me how to make this scroll horizontal instead of vertical?

Code:
        //##########################################################################//
	// Scrolling background Tutorial Code by http://www.kudoswebsolutions.com
        // Original Source code: http://youlove.us/
        // Modified and extended by Kudos Web Solutions
        // copyright 2009 kudoswebsolutions.com
        //##########################################################################//

$(function() {
	// Define the height of your two background images.
           //The image to scroll
	   var backgroundheight = 2000;
           //The image to overlay
	   var backgroundheight_two = 1000;
	// Create a random offset for both images' starting positions
        offset = Math.round(Math.floor(Math.random()* 2001));

 
	function scrollbackground() {
                //Ensure all bases are covered when defining the offset.
   		offset = (offset < 1) ? offset + (backgroundheight - 1) : offset - 1;
		// Put the background onto the required div and animate vertically
   		$('#container').css("background-position", "50% " + offset + "px");
   		// Enable the function to loop when it reaches the end of the image
   		setTimeout(function() {
			scrollbackground();
			}, 100
		);
   	}
	function scrollbackground2() {
                //Ensure all bases are covered when defining the offset.
   		offset = (offset < 1) ? offset + (backgroundheight - 1) : offset - 1;
		// Put the background onto the required div and animate vertically
   		$('#container2').css("background-position", "50% " + offset + "px");
   		// Enable the function to loop when it reaches the end of the image
   		setTimeout(function() {
			scrollbackground2();
			}, 100
		);
   	}

	// Initiate the scroll
	scrollbackground();
	scrollbackground2();

	// Use the offset defined earlier and apply it to the div.
   		$('#overlay').css("background-position", "50% " + offset2 + "px");
   		$('#overlay2').css("background-position", "50% " + offset2 + "px");
});
__________________

Check out SilvaTales
Reply With Quote
  #2  
Old 03-29-2012, 03:40 PM
solskenn's Avatar
solskenn solskenn is offline
Member
 
Join Date: Mar 2012
Location: Ankh-Morpork
Posts: 73
Gender: Female
Credits: 6,053
solskenn is on a distinguished road
Default

I'm almost sure you noticed this, especially as (judging from your site) you have more experience than me. However I'll post it anyways in case it got overlooked or something...

" offset = (offset < 1) ? offset + (backgroundheight - 1) : offset - 1;
// Put the background onto the required div and animate vertically
$('# "

Do you think changing the "vertically" on both background things to "horizontally" would fix that? I'm sorry if you already tried this.. or if maybe it won't do anything at all to edit it.. just a thought/suggestion.

(I can't make codes, but /sometimes/ I can edit /little/ things if I can figure out what it does and how to move it. Though its a slow process ...)
Reply With Quote
  #3  
Old 03-29-2012, 03:45 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 84,234
SilverDragonTears is on a distinguished road
Default

That part is just a comment so changing the words won't fix it :/ Thanks for trying though
__________________

Check out SilvaTales
Reply With Quote
  #4  
Old 03-29-2012, 04:03 PM
solskenn's Avatar
solskenn solskenn is offline
Member
 
Join Date: Mar 2012
Location: Ankh-Morpork
Posts: 73
Gender: Female
Credits: 6,053
solskenn is on a distinguished road
Default

jQuery
stock overflow

Well since that didn't help, I did a google.. maybe one of these will help. The first one seems more like a software.. the second one seems more like a guide..
Reply With Quote
  #5  
Old 03-29-2012, 04:22 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 84,234
SilverDragonTears is on a distinguished road
Default

Eh... nothing there is helping me. This is so frustrating.
__________________

Check out SilvaTales
Reply With Quote
  #6  
Old 03-29-2012, 08:25 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 84,234
SilverDragonTears is on a distinguished road
Default

I worked ALL day on this!! How does it look?
http://taleofdragons.net/adopt.php
__________________

Check out SilvaTales
Reply With Quote
  #7  
Old 03-29-2012, 08:49 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 393,090
Hall of Famer is on a distinguished road
Default

umm looks like your css is somewhat messed up, I see eggs appearing below the template footer...
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #8  
Old 03-29-2012, 08:57 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 84,234
SilverDragonTears is on a distinguished road
Default

Do a hard refresh....
__________________

Check out SilvaTales
Reply With Quote
  #9  
Old 03-29-2012, 09:22 PM
solskenn's Avatar
solskenn solskenn is offline
Member
 
Join Date: Mar 2012
Location: Ankh-Morpork
Posts: 73
Gender: Female
Credits: 6,053
solskenn is on a distinguished road
Default

OH! No wonder those didn't help ^^;;
I misunderstood and thought you wanted a horizontal scrollbar.. *facepalms*
Sorry -,-

It looks awesome silver, kind of mysterious.
Reply With Quote
  #10  
Old 03-29-2012, 09:26 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 84,234
SilverDragonTears is on a distinguished road
Default

Thanks! ^^
__________________

Check out SilvaTales
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript and Mysidia Abronsyth Questions and Supports 5 09-06-2014 07:22 PM
Javascript included in PHP? Aasixx Questions and Supports 2 10-30-2012 02:46 AM
\\Javascript Help, Please// Poppy Questions and Supports 0 11-06-2011 11:28 AM
Javascript help? AlexC Programming and Game Development 0 07-19-2011 06:22 AM
Anyone here knows Javascript? Hall of Famer Other Chat 5 04-06-2011 07:21 PM


All times are GMT -5. The time now is 06:43 PM.

Currently Active Users: 808 (0 members and 808 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636