Go Back   Tactical Gamer > General Forums > General Discussion


General Discussion This forum is for any type of conversation that really isn't specialized enough to belong in any of the other forums.

Reply
 
Thread Tools
Old 09-13-2006, 08:39 PM   #1 (permalink)
 
icky's Avatar
 
Join Date: Jul 2005
Location: Ottawa Valley
Posts: 6,154
Web developer question

I'm sure we must have some pros around here who can answer this.

How would I go about creating a web page which loads an image and then overlays smaller images on top of the original in precise locations. This would be done entirely client-side.

I have little experience beyond basic html, but I have lots of coding experience. If you know where there might be a good example of such a thing, just point me there, and I'll figure it out.

Thanks!

(I may just do it in C++ if there's no magically easy way)
__________________
Peace through fear... since 1947!
icky is offline   Reply With Quote
Old 09-13-2006, 08:47 PM   #2 (permalink)
 
icky's Avatar
 
Join Date: Jul 2005
Location: Ottawa Valley
Posts: 6,154
Re: Web developer question

Ooo... I was just looking around and it looks like Flash might be an easy solution to this. I've always wanted to learn about Flash.
__________________
Peace through fear... since 1947!
icky is offline   Reply With Quote
Sponsored links
Old 09-14-2006, 06:06 AM   #3 (permalink)
Registered User
 
Bommando's Avatar
 
Join Date: Jun 2005
Location: Sydney, Australia
Age: 30
Posts: 4,294
Re: Web developer question

Do you mean you want to do this interactively so the user can drag stuff around?

If it needs to be done entirely client-side, then JavaScript is your cross-platform option. Flash would also be able to do it to a certain extent, but it's far from trivial and I am not certain about its ability to export your generated images.

This is the closest thing I could find that was a simple overlay / dragging tool:

Creating Online Image Editor.

If you view the HTML source, you'll see the JavaScript code in there.
Bommando is offline   Reply With Quote
Old 09-14-2006, 09:44 AM   #4 (permalink)
 
icky's Avatar
 
Join Date: Jul 2005
Location: Ottawa Valley
Posts: 6,154
Re: Web developer question

No, the user doesn't need to be able to drag stuff. I just need to overlay markers on a jpg. I already have a mostly functional C++ version working, but I'm still interested in javascript if there's an easy way.
__________________
Peace through fear... since 1947!
icky is offline   Reply With Quote
Old 09-14-2006, 10:07 AM   #5 (permalink)
 
Join Date: May 2003
Location: Sweden
Posts: 128
Re: Web developer question

No need for any fancy scripts then. Use css to set 'background' and then 'position: absolute' for the overlay images. Just create the proper box-hierarchy with 'div' and you are set.

If you need content to display dynamically on mouse-over, you can use ':hover' with 'display' to the same effect.
Cain is offline   Reply With Quote
Old 09-15-2006, 11:51 PM   #6 (permalink)

 
Iceberg's Avatar
 
Join Date: Dec 2004
Location: Illinois
Age: 24
Posts: 1,924
Re: Web developer question

CSS
Cascading Style Sheets, really easy stuff and very easily integrated into HTML.

www.w3schools.com for some basic tutorials.
__________________
It only takes 2 bites [insert parasite] to get to the center of a meatpop.
TGNS Admin | NS Forum Moderator Digz | NS Play Tester
Natural Selection | TGNS Primer | Communication Awareness!
Army Info:
AIT - 37F @ Fort Bragg, NC
Graduate AIT Oct 23rd.
Iceberg is offline   Reply With Quote
Sponsored links
Old 09-16-2006, 12:20 AM   #7 (permalink)
 
icky's Avatar
 
Join Date: Jul 2005
Location: Ottawa Valley
Posts: 6,154
Re: Web developer question

Thanks guys! This is very interesting. I can see how to place text, so if I can apply this to images, I will be well on my way. I can just write a litle parser to translate my data into HTML.

Edit: I see how to apply it to images
__________________
Peace through fear... since 1947!
icky is offline   Reply With Quote
Old 09-18-2006, 06:19 PM   #8 (permalink)
 
shroompicker's Avatar
 
Join Date: Nov 2003
Location: Arizona
Age: 34
Posts: 183
Re: Web developer question

Just know ahead of time, if you use the 'absolute' style, the image and the overlaid images are going to be about the only fancily formatted thing on the page. That is, you would be able to place paragraphs or other images on the page which simply flow after it, you're okay, but if you want to put this collage in a box, then place the box somewhere like a table, you're dead.

Also, be sure to test it on Firefox, Safari, and IE6 for Win (screw IE for Mac).

Just to let you know the limitations before you bang your head on the keyboard for sixteen hours like most of us end up doing when first trying this
__________________
-- Shroom
I tried smoking mushrooms once. Couldn't keep the pizza lit.
shroompicker is offline   Reply With Quote
Old 09-18-2006, 06:34 PM   #9 (permalink)
 
icky's Avatar
 
Join Date: Jul 2005
Location: Ottawa Valley
Posts: 6,154
Re: Web developer question

Heh... thanks for the advice. I ended up tinkering with the CSS stuff for awhile, doing almost everything I wanted, then I moved on. Learned lots though.

I realized that if I was going to do my parsing in Python, I might as well just use it to edit the images at the same time. Then you can just display the processed images in a browser.
__________________
Peace through fear... since 1947!
icky is offline   Reply With Quote
Old 09-18-2006, 06:45 PM   #10 (permalink)
 
shroompicker's Avatar
 
Join Date: Nov 2003
Location: Arizona
Age: 34
Posts: 183
Re: Web developer question

<img src="imgBig.png" style="position: absolute; top: 100px; right: 100px;">

<img src="img1.png" style="position: absolute; top: 150px; right: 100px;">

<img src="img2.png" style="position: absolute; top: 100px; right: 150px;">

<img src="img3.png" style="position: absolute; top: 200px; right: 200px;">
__________________
-- Shroom
I tried smoking mushrooms once. Couldn't keep the pizza lit.
shroompicker is offline   Reply With Quote
Sponsored links
Old 09-18-2006, 06:50 PM   #11 (permalink)
 
icky's Avatar
 
Join Date: Jul 2005
Location: Ottawa Valley
Posts: 6,154
Re: Web developer question

Just out of curiousity, how might you make the background of the overlaid images transparent?

Nevermind, I got it.
__________________
Peace through fear... since 1947!

Last edited by icky; 09-18-2006 at 07:34 PM.
icky is offline   Reply With Quote
Old 09-19-2006, 06:23 AM   #12 (permalink)
 
Join Date: May 2003
Location: Sweden
Posts: 128
Re: Web developer question

A good example of what can be done with css can be found here. All the different styles are done in css and the underlying html is unchanged. You can pick up a few neat tips and tricks as well as some inspiration for your own design.
Cain is offline   Reply With Quote
Sponsored links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MS AntiSpyware question regarding demo Wyzcrak Ghost Recon Advanced Warfighter - General Discussion 7 12-24-2006 10:23 PM
Theology question Rick_the_new_guy The Sandbox 37 08-15-2006 05:08 PM
map, mod, content question roger smith Battlefield 2 - Map & Mod Development 2 07-02-2006 02:15 AM
Temp question Drizzid Hardware & Software Discussion 6 11-26-2005 08:35 AM
AAS Mod on Private Server Question Vodkatonic Battlefield 2 - Tactics and Missions Discussion 1 10-04-2005 10:08 PM


All times are GMT -4. The time now is 07:30 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
©2004-2008 - Tactical Gamer - All Rights Reserved