3 Replies Latest reply on Jul 27, 2006 7:00 PM by ShadowTiger111

    Interactive Map

    ShadowTiger111
      Please forgive me if this topic has been gone over already... I've spent the last few months trying to accomplish the following.

      What I want: I'm trying to create a map where if a user mouses over a name on the map, a small box comes up over the mouse position with information regarding that city.

      What I have: I have an image, lets say 800x444. There are names on this map.

      What I've done: I've tried several diffrent approaches from mouseOver to _dropTarget and nothing has worked like their accompanying tutorial has indicated. I did get the drapTarget to work, but it's very limited in how much text control I have. Or atleast as far as my limited knowladge can tell.

      Does anyone have any tutorial on how to accomplish this? Action scripting is all new to me aside from basic movie control scripting.

      Please help
      Thanks.
      Daniel
        • 1. Re: Interactive Map
          MediaMan5335 Level 1
          Hi,
          This is how I would aproach it:
          I'm guessing that the names of the cities are on the image of the map already and that you aren't adding them yourself in Flash using static text. What I would do is make an invisible button over each of the cities. So draw a square over the city name, select it and make it a button, open the properties panel while the button is selected. On the right side of the properties panel it will say 'color' with a drop down menu beside it, select 'Alpha' from it. then beside it, change the alpha number to 0 making the button invisible.
          Now take your bubble and the information about that city and select it and make it into a movie clip. Give the movie clip a unique instence name in the properties panle like newyork_mc.
          Also give your button a unique instence name like newyork_btn.

          Now I normally put all my code in one place on the main timeline on a layer named 'Actions'
          on the main timeline open the actionscript window and use the following code:

          //to make the info bubble not visible until needed.
          newyork_mc._visible=false;
          //now for the script to make the button work.
          newyork_btn.onRollOver =f unction(){
          newyork_mc._visible=true
          }
          newyork_btn.onRollOut =f unction(){
          newyork_mc._visible=false
          }
          That should make it work the way you want I believe.
          If you have a large number of cities you will want to look into how to use a loop in order to save yourself from having to do tons of lines of code. Let me know if you need help,
          • 2. Re: Interactive Map
            ShadowTiger111 Level 1
            Ah, that sounds prett easy and clear. I will try it out tonight when I get home. And yes, the names are static on the acual picture I'm using.

            And yes, there's quite of few names. How do I loop it?
            • 3. Re: Interactive Map
              ShadowTiger111 Level 1
              Ok, so I followed the easy to understand steps. No problems with the scripts I understood their fuctions. Far as Flash is concerned there's no script errors.. Button made, no problems, movie clip no prob... So, put them all together... Layer 1 Background which consists of the map, invisable button and the movie clip off stage. instence names are set for both. Action Script made on another layer. Test the movie... No good... The hand changes over the button like it's supposed to, but the movie didn't fade in, or pop up... Any ideas?