|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Populate a flash map dynamically via mysql
I need to build a dynamic flash map that uses a mysql database and php to pull locations from a database and put them on a map. The data in the database would constantly change- i.e. a real estate map.
This is my fist attempt at this, and I was wondering if anyone could point me in the direction of some tutorials I would need to accomplish this. Pulling data from the database is no problem, it's figuring out how the dots on the map will be placed correctly from the data in the database. I assume I'll have to use some kind of coordinate system, but how to implement such a thing is beyond me. Thanks in advance. |
|
#2
|
|||
|
|||
|
Hy,
I don't understand exactly what you mean by placing the dots on a map ... you want to mark an important thing on your map ??? ... so you have a big picture (map) and at pixel 50 from the top and 30 from the left you want to add an text or something ??? Quote:
anyway I need help on my map to and I was thinking not to post another thread about almoust the same thing and I will tell my problem here ... so here it is What I wanna do is a new map for my city, I have one now ( Sibiu Map ) but I want to make it more complex, what I want is to add an option that will search in a database for a specified street, the visitors should enter the name of the street and after presing the button search a script should search in the database for the specified street and if found to return the name of the movieclip, from the map (every street should be a movie), and then .. the flash should do something with that movieclip (blink, change color .. I'm not sure yet) I made my map in CorelDraw .. so I have a VERY small file size ~40k , Now I want to have every street in a separate movieclip , so the main file will have many moviclips, houndredths ... Is this "hard" for for the flash player?? .. will my file run very slow on actual computers ???? Now where I have some problems , and I don't know where to start is about the databse connection ... I don't have problems with PHP, I can do all my scripts that need to search in the database for a street ... but I don't know how to make the conection between the php file and the swf file .. so I ask you to give me a good tutorial about this or if you have something similar to what I need pls give me an reply and show me. 10x in advance see ya all
__________________
Check this to see some nice 360° panormaic images from Sibiu. [ Quick Time required ! ] , visit Sibiu website to find out what's happening in Sibiu, or visit our forum from this adress :Sibiu forum Luxury Gadgets - The finest expression of luxury |
|
#3
|
|||
|
|||
|
Hi jpluttme, ovisopa kinda gave you the answer. Store the x and y pixel co-ordinates in the database as well. Its a bit of a pain with a real estate map. You could try getting the real-world geographical location (if the real estates provide that sort of data for you) and then calculate the difference in scale between that (the real world co-ords) and the map image your using. i.e. distance between two streets in real world co-ordinates and then the same two streets in the map image. That way, depending on the input data (i.e. if they enter geographical co-ords from the get go) it can all be automated. Otherwise someone will have to work out just the image co-ords which can be a really annoying process in the long run.
If you want to know how to position text etc... say the image is loaded into a movie clip child of _root, and the x and y are zero (for this example to be easier). i.e. the image is top left aligned in the movie. in root keyframe 1 have: _root.createTextField("locationText" + i, i, xCoOrd, yCoOrd, 360, 20); this["locationText"+i].text = readInFromDBText; The "i"'s are to similate that you've done that in a for loop or some such to read several pieces of data. Dont know if you want to know about that so I wont go into it too much, ask if you want to know more. |
|
#4
|
|||
|
|||
|
Hi ovisopa, here are some tutorials:
Macromedia Flash MX and PHP - Tutorial hotscripts.com - Stuff you can download and see how they did it. Flash MX + PHP + PHPObject - This uses PHPObject which is what I use. Its an extra layer though... Happy Reading :¬) |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Populate a flash map dynamically via mysql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|