Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 15th, 2003, 03:11 PM
jpluttme jpluttme is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 84 jpluttme User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 22 m 34 sec
Reputation Power: 8
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.

Reply With Quote
  #2  
Old December 16th, 2003, 10:04 AM
ovisopa ovisopa is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Sibiu, Romania
Posts: 176 ovisopa User rank is Private First Class (20 - 50 Reputation Level)ovisopa User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 11 h 37 m 30 sec
Reputation Power: 6
Send a message via Yahoo to ovisopa
Exclamation need help too with my map

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:
... it's figuring out how the dots on the map will be placed correctly from the data in the database


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

Reply With Quote
  #3  
Old December 16th, 2003, 03:33 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,714 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 10093 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 11 h 8 m 12 sec
Reputation Power: 580
Facebook MySpace
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.
__________________
-Tann

-Vote for your favorite ActionScript editor here.

Reply With Quote
  #4  
Old December 16th, 2003, 03:50 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,714 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 10093 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 11 h 8 m 12 sec
Reputation Power: 580
Facebook MySpace
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 :¬)

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Populate a flash map dynamically via mysql


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT