View Full Version : design help....maps
boyzdynasty
01-07-2004, 03:04 PM
I was not sure where to put this...but here it goes...
I'm having trouble thinking of the most efficient way to do this "map" thing...
Bg info.:
This is a site that is currently in html. The owner wants to add maps to it using FLASH.
Objective:
1 - If a user clicks on Hotels, dots will appear on the map locating the hotels the owner is affiliated with.
If a user clicks on Restaurant, dots will appear on the map locating the hotels the owner is affiliated with.
etc...
2 - If the user clicks on one of the dots, a menu/description window appears providing information about the venue.
My boss created a map(s) in illustrator w/ the dots and exported it into Flash as frames....the map is hughe. So I guess only a small portion of the map will be shown providing scrolling option and zooming options.
I'm basically stuck. I'm not sure how to start it off....
Any ideas?
well, since your boss has already created the maps... you options may have already been dictated to you.... since many folk take design changes personally....
my choice would have been to use just a regular map, and then place dots (mc placed dynamically via as) at the x/y coordinate for each restaurant/hotel, with coordinates kept in a flat file.
the_unknown_one
01-07-2004, 03:34 PM
have your map, and then have three different movie clips. then have three funtions.
hotels(); restaurants();, etc.
In the funcs, have it like this:
function hotels(){
hotels_dots.gotoAndStop("on");
displaybox.gotoAndStop("hotels");
}
function restaurants(){
restaurants_dots.gotoAndStop("on");
displaybox.gotoAndStop("restaurants");
}
etc.
The string "on" is the frame label of the movie clip controlling the Restaurant's dots, and the label being the frame o which the dots are placed,the otther frame being blank.
Hope this helps.
boyzdynasty
01-07-2004, 03:36 PM
i have to factor in the zoom option...when the person zooms on the map...
where ever they click on the maps (other than the dots) it will zoom and center that location (spot).
would the x,y coordinates change? how do i keep everything porportional?
annexion
01-07-2004, 04:19 PM
For that problem I would use TG's advice, but nest everything in one movieClip. That way you could resize that movieClip and everything would follow accordingly.
boyzdynasty
01-07-2004, 04:22 PM
ok. So then, I would have different maps (w/ dots) for each section?
But i want to having a hughe movie file....
annexion
01-07-2004, 04:34 PM
Well, you could load everything in dynamically. That's hardly an issue.
But if you structured your site something like
Main clip>
Maps on each frame with corresponding dots>
individual map and dot movieClips:
That way you could send the Main clip to a specific frame for a map and when you want to zoom, just increase the scale of Main clip. And everything will still be proportionally correct such as dot location.
boyzdynasty
01-07-2004, 04:45 PM
i see. thanx.
BTW: I search for zoom samples...but I have not found one for the click option. (zooming and focus on the area of the clicked). If you know of any, let me know. Thanx.
annexion
01-07-2004, 05:47 PM
_global.stageWidth = 550;
_global.stageHeight = 400;
for (i in map) {
balls = map[i];
balls.onPress = function() {
this._parent._xscale += 20;
this._parent._yscale += 20;
//
if (this._parent._x<=_root._xmouse) {
this._parent._x = (stageWidth/2)-(_root._xmouse-this._parent._x);
} else {
this._parent._x = (stageWidth/2)+(this._parent._x-_root._xmouse);
}
if (this._parent._y<=_root._ymouse) {
this._parent._y = (stageHeight/2)-(_root._ymouse-this._parent._y);
} else {
this._parent._y = (stageHeight/2)+(this._parent._y-_root._ymouse);
}
};
}
Make a rectangular clip, center it on the stage and call it map. Then make a movieClip representing the dots you want. Place those randomly within the map movieClip, and make sure to name them differently. The above code should give you an idea how to do it. With it you could add progressive, eased zooming and such like that. I hope it illustrates what I intended to explain to ya;)
boyzdynasty
01-07-2004, 05:50 PM
ok. I will try later today and let you know my progress.
thanx for the help everyone!
CyanBlue
01-08-2004, 05:34 AM
Jessica lucidiastudios did the same map thing a while ago...
xxlm had made a component for this sort of purpose a while ago...
Also, check on this site as well...
http://www.mapnetwork.com
:D
boyzdynasty
01-08-2004, 07:04 PM
had a meeting today...it's bit more complex now...*sigh*...
Does anyone know how to ZOOM a background and leave the foreground unsized but still assume the position/coordinates of the background?
He has a map... base layer has the lines (roads & highways). The next layer up are text (city/district/county names). The next layer up are the dots.
(He saw an example on CNN...but I couldn't find it)
The base layer of the map will zoom but the text and dots remain the same size. However, the dots still maintain the exact coordinates and so does the text.
boyzdynasty
01-08-2004, 07:22 PM
btw: Thanks for that map link (CB)...that was very helpful
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.