Page 1 of 1

Re: Dynamically sizing map regions

PostPosted: Wed, 11Mar02 11:02
by tlaero
Phreaky's and my games use a CSS file to set the image size, but have hard coded map regions for the hit targets. The intent of this thread is to investigate methods for making the image size variable and having the map targets scale to match.

I can certainly do it with a lot of Javascrïpt, but I'm interested in hearing other methods. Part of the advantage of how things are currently done is that the html code is fairly simple and readable for the non-coders who use Adventure Creator. It's a fine line between functionality and ease of use that I'm trying to walk.

TheBrain, could you repost the link you provided in the Survey thread?

BKP UP, could you talk more about how to do this with CSS files?

We're 500 HTML files into our next game already (literally) so we probably won't change that one. But I'm open to changes for the next one.

Tlaero

Re: Dynamically sizing map regions

PostPosted: Wed, 11Mar02 12:45
by Squeeky
Tlaero,
I have sent a PM which may be of value.

No promises, my understanding in these matters is minimal.

Re: Dynamically sizing map regions

PostPosted: Thu, 11Mar03 00:14
by TheBrain
The link I posted was http://home.comcast.net/~urbanjost/semaphore.html

I just took a quick look at how they did the fullsize rescaling example (http://home.comcast.net/~urbanjost/IMG/fullsize.html) and it would appear that as long as you use the same id's for the image and imagemap you could do this automatically by just adding a javascrïpt to each page (which should trigger when a resize is necessary).

Now obviously you wouldn't want to bluntly resize the image to the background size, you'd need to maintain aspect ratio and keep room for text, etc.

But as for the basic concept this seems very doable.

Re: Dynamically sizing map regions

PostPosted: Thu, 11Mar03 08:59
by tlaero
Thanks, TheBrain. I'll take a look at that in the next few days.

Tlaero

Re: Dynamically sizing map regions

PostPosted: Wed, 11Aug24 22:05
by pH Cockatrice
This is cool! Thanks!