Loading External Text into an Image Map

  • (2 Pages)
  • +
  • 1
  • 2

19 Replies - 1914 Views - Last Post: 16 October 2008 - 11:12 AM

#1 jli112  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 29-September 08

Loading External Text into an Image Map

Posted 30 September 2008 - 12:21 PM

A little background on what I'm trying to do. I am making an campus image map, when the mouse is rolled over one of the letters, a little box should come up to show a little snipped about the building and then something that can be clicked to go to the web page associated with that building.

This page is what I had/have so far Campus Map. Now, what is going on there is, those things that follow the marker around are images and the letters themselves are hotspots. I need to make it better.

Here is the code I'm putting in the button:

on (rollOver) {
	loadText = new LoadVars();
	loadText.load("engtech.txt");
	loadText.onload = function(success) {
		if (success) {
			// trace (success);
			engtech.html = true;
			engtech.htmlText = this.engetch;
		}
	};
}



My problem is that I don't know if I'm putting it in the right place, or if I'm asking too much of my button (a rollover and a click - but its on a different layer). Eventually if I get the rollover to work and have the external text show up (and show as html) I would take the onclick off and just have the text link inside the box that would show for each building. When I test the movie, I don't see anything come up. I tried it another way, but I never saved that old code, and just had an empty text box. I'm so confused.

Is This A Good Question/Topic? 0
  • +

Replies To: Loading External Text into an Image Map

#2 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: Loading External Text into an Image Map

Posted 01 October 2008 - 11:05 AM

I'll look into this later this afternoon. I've got some ideas.
Was This Post Helpful? 0
  • +
  • -

#3 jli112  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 29-September 08

Re: Loading External Text into an Image Map

Posted 01 October 2008 - 11:27 AM

Thats awesome, thanks so much. Any help you can give me is greatly appreciated. :)
Was This Post Helpful? 0
  • +
  • -

#4 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: Loading External Text into an Image Map

Posted 04 October 2008 - 03:34 PM

Sorry for the delay; been busy. I'm playing with this now.

EDIT: Can you attach the source file for me to play with? I could write something that'll work for you, but I can't correct your own attempt without seeing it. I need to know how/where "engtech" has been used (you've assigned it as it's own htmlText, which should have thrown an error).

This post has been edited by DilutedImage: 04 October 2008 - 03:46 PM

Was This Post Helpful? 0
  • +
  • -

#5 jli112  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 29-September 08

Re: Loading External Text into an Image Map

Posted 06 October 2008 - 09:00 AM

Sure! I zipped up the files I was working on. campusmap3a includes the fla and the text file that I'm using. This is the one that I copied the code out of to show. I included the text file in case there is something I forgot to include in it that is causing it not to work. It is the one that will most likely become the final product. I also zipped campusmap3, which just shows the steps before 3a, before I took the images and marker out, just to show progression. Thank you again for looking at this, I've been working on it for months.

EDIT: It helps if I upload the zips..Attached File  campusmap3a.zip (60.45K)
Number of downloads: 79Attached File  campusmap3.zip (888.41K)
Number of downloads: 81

This post has been edited by jli112: 06 October 2008 - 09:12 AM

Was This Post Helpful? 0
  • +
  • -

#6 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: Loading External Text into an Image Map

Posted 06 October 2008 - 06:43 PM

EDIT: campusmap3a includes the swf and txt file. The FLA would be most helpful. :D

EDIT2: campusmap3.fla has the code pasted above, so I'll just work off that one.

This post has been edited by DilutedImage: 06 October 2008 - 06:53 PM

Was This Post Helpful? 0
  • +
  • -

#7 jli112  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 29-September 08

Re: Loading External Text into an Image Map

Posted 06 October 2008 - 08:44 PM

View PostDilutedImage, on 6 Oct, 2008 - 06:43 PM, said:

EDIT: campusmap3a includes the swf and txt file. The FLA would be most helpful. :D

EDIT2: campusmap3.fla has the code pasted above, so I'll just work off that one.



Oh wow I'm sorry I must have zipped the wrong file. If you need the other one I can zip that as well. Both files should have some part of the convoluted code I tried to write. :D I thought I included the fla. sorry bout that.
Was This Post Helpful? 0
  • +
  • -

#8 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: Loading External Text into an Image Map

Posted 07 October 2008 - 12:54 AM

No problem. I scrapped most of it anyways. :D

Attached is my revision. I've ditched the LoadVars approach, in favor of XML. I'm lazy though, so only buildings A-C have been typed out. Be sure to keep the CDATA tags in there, so your HTML is preserved.

The code is short, but there's a lot going on, so just post up if you have any questions about it.


EDIT: I removed the attachment. A Flash 8 version has been attached a couple posts down.

This post has been edited by DilutedImage: 09 October 2008 - 11:08 AM

Was This Post Helpful? 1
  • +
  • -

#9 jli112  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 29-September 08

Re: Loading External Text into an Image Map

Posted 08 October 2008 - 10:56 AM

You are a lifesaver! I will look at it this afternoon and work on finishing it. Thanks so much!
Was This Post Helpful? 0
  • +
  • -

#10 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: Loading External Text into an Image Map

Posted 08 October 2008 - 12:30 PM

Happy to help. :)
Was This Post Helpful? 0
  • +
  • -

#11 jli112  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 29-September 08

Re: Loading External Text into an Image Map

Posted 09 October 2008 - 09:35 AM

I have the most basic of stupid questions... um I forgot to mention which version of flash I had been using (Flash 8). When I try to open the file it says unexpected file type or something like that. I am looking for the Flash CS3 trial on adobe's site, but can't seem to find it. Is there a way to save it so its compliant with flash 8?
Was This Post Helpful? 0
  • +
  • -

#12 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: Loading External Text into an Image Map

Posted 09 October 2008 - 11:05 AM

Whoops! I noticed that when I opened it, and forgot about it when I saved it back out. Sorry about that. I've attached a Flash 8 version.

Attached File(s)


Was This Post Helpful? 1
  • +
  • -

#13 jli112  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 29-September 08

Re: Loading External Text into an Image Map

Posted 09 October 2008 - 11:35 AM

You are wonderful! I've got it open, now I'm going to poke around and work on finishing it. :) Thank you so much for all your help.
Was This Post Helpful? 0
  • +
  • -

#14 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: Loading External Text into an Image Map

Posted 09 October 2008 - 11:48 AM

I do what I can. :)
Was This Post Helpful? 0
  • +
  • -

#15 jli112  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 29-September 08

Re: Loading External Text into an Image Map

Posted 14 October 2008 - 12:12 PM

This is so awesome, I made sure to click the "the was helpful" button. :) I am working on the xml file, its actually not has hard as I thought it might be. I did take a look at the actionscript, and wow! there is a lot going on.

I just have one more teeeenny tiny question. lol is there a way that I could add something to do the code to make the little box show 'on top' or say not disappear off the map? The hotspots closest to the top of the map lose most of the little box.

EDIT2: Ok, so yesterday I edited this post twice.. and now today again. I don't know why ALL OF A SUDDEN the xml file is being read and its all working. So, xml file has all the info and it looks good. I still have the issue of disappearing boxes at the top.

Ignore the attachments, I'm don't know how to delete them. :)

Thaanks.. I will never been good at this

This post has been edited by jli112: 15 October 2008 - 09:03 AM

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2