Heya guys, I own a game called Beast Hero, I am in the process of re-creating the map interfaces so it will work well in most common browsers & resoloutions, The trouble i'm having is that i think of a way to limit the content on a page.
Here's what i'm trying to do.
So i have the map, I can set whatever width's i want for the map, But it will make the page scroll, I don't want this, I want a "Boundry" if you like at the edge of the page so that the map cuts off, Instead of loading the whole map and scrolling.
Is there any way of doing this?
Please & Thank you.
Creating a "Limit" For page content
Moderator: General Moderators
Re: Creating a "Limit" For page content
I think we're going to need a few more details.
This is in PHP?
How are your maps implemented?
This is in PHP?
How are your maps implemented?
Re: Creating a "Limit" For page content
I'd suggest either an Iframe or using JS but that might be a lot of work if you need to re-program the map.
Re: Creating a "Limit" For page content
Well the map can be sent to the browser, In all sorts of hiehgts and widths, You can set how big you want the map to be, The thing im trying to do is make something like an Iframe, I might maywell use an Iframe.
also, I have been researching the .scrollTop; & .scrollLeft; functions in Javascript.
I am just totally stuck on how i would do this, I was thinking of creating a script where it checks when the player clicks to move on the map, If it is going left it will scroll left on that function by 32px, If it goes right it would scroll right ect.
I was looking through my database and i think i have an "Idea" on how i would do this.
Create a variable where it gets the database value for Map_Left (x) and Map_Top (y), If the value goes below that value scroll left, If it is higher, Scroll right.
That is my idea anyway. Anymore thoughts?
also, I have been researching the .scrollTop; & .scrollLeft; functions in Javascript.
I am just totally stuck on how i would do this, I was thinking of creating a script where it checks when the player clicks to move on the map, If it is going left it will scroll left on that function by 32px, If it goes right it would scroll right ect.
I was looking through my database and i think i have an "Idea" on how i would do this.
Create a variable where it gets the database value for Map_Left (x) and Map_Top (y), If the value goes below that value scroll left, If it is higher, Scroll right.
That is my idea anyway. Anymore thoughts?
- Bill H
- DevNet Resident
- Posts: 1136
- Joined: Sat Jun 01, 2002 10:16 am
- Location: San Diego CA
- Contact:
Re: Creating a "Limit" For page content
Shouldn't this be on Client Side forum? Not being picky, but you might get better results there, given that the topic seems to have to do with that subject.
Re: Creating a "Limit" For page content
Yes, Sorry it probably should, Sorry, Shall i re-create this thread there or ask for a mod to move it?