Flash Map
- Started
- Last post
- 11 Responses
- juhls
I know this is simple, but anyone know the best way (a tutorial would be nice) to make a flash map?
Basically, I will have a map of Canada and each province / territory will be a hot spot. When a user hovers on those spots, some text will show up.
Thanks.
- PonyBoy0
your hotspots are nothing more than buttons... use onRollOver in as2 to reveal the information.
The clip you put your info in - set it's _alpha to 0... onRollOver... yourText._alpha = 100;
done. :)
- Nairn0
This is no use to you, I'm sure, but personally I'd just do it with basic JQuery and an image map.
- juhls0
I just thought of that. I could make each item a button....gotcha
- juhls0
Nairn, I was thinking of using jQuery as well. The problem is that my co-workers think flash is so much fancier. That, and I have like 4 other scripts they wanted on the same page, so I'd have to make sure everything was compatible.
Thanks for the suggestion though. I'm looking at both options.
- juhls0
These answers are so obvious, but I only seem to realize them after posting something like this here. Thanks again.
- I'm glad I'm not the only one that happens to. Worrying that our creativity only appears to stem from public humiliation.Nairn
- I keep thinking of the more complex solutions.juhls
- hahaha, Nairn. Possibly.juhls
- this is just logic - the creativity is in the design... not the dumb logic of a button - you guys rule and don't even know it. ;)PonyBoy
- "just logic" hahah
:)juhls
- WeLoveNoise0
take it u dont work much with flash ?
- fyoucher10
You're going to run into layering issues with your method, especially if the text is larger than the button / province area. FYI, you'll need to use 'swapDepths'.
So if you're using basic AS2 or AS1 and attaching the code to a button (since it seems like you're pretty new to Flash) you would use the following code in the button script:
this.swapDepths(this.getNextHigh...
...or another variation of depth swapping (depends on circumstance)...
- acescence0
... or you could have one info area on top that's updated/repositioned when you roll over each button.
- PonyBoy0
^^?
nah uh!... what layers are you talking about? The buttons aren't touching if they're the shape of the province... so there's no 'layering' issue there...
... and the text that turns on... that can reside always above the button and above the map... it's layer will never change...
... i'm confused as to what layers are going to be fighting each other, fyoucher... :)
- canuck0
Just make your info/text boxes movie clips that slide/ fade in out when use rolls over buttons. There aren't that many provinces easy enough to cancel out one box for another etc.
- PonyBoy0
juhls... you'll avoid depth issues if you use a vector map that has the provinces nice and cleanly separated ... no overlapping of buttons!!
onRollOut - use this to turn the text for that area's _alpha back to 0.
myProvince.onRollOut = function ( ) {
thisProvinceText._alpha = 0 ;
}