How to use ModestMapsSample.fla ?
Hello,
I've just come across modest maps and would like to try it out. I've downloaded the ModestMaps-AS3-1.0-latest file and followed the build instructions to add the as3/lib folder to the classpath options. (I'm working with CS4).
I'm stuck at this point. If I try to test the movie all I see is a charcoal colored rectangle. Can someone please tell me what I'm missing?
Thanks,
Jennifer
I've just come across modest maps and would like to try it out. I've downloaded the ModestMaps-AS3-1.0-latest file and followed the build instructions to add the as3/lib folder to the classpath options. (I'm working with CS4).
I'm stuck at this point. If I try to test the movie all I see is a charcoal colored rectangle. Can someone please tell me what I'm missing?
Thanks,
Jennifer
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Hi Jennifer,
I tried the same thing, but with CS3. Here's what I did:
1. Downloaded http://modestmaps.com/download/Modest...
2. Unpacked the archive and opened ModestMapsSample.fla from the as3/samples/flash folder.
3. Open the File menu, click Publish Settings...
4. Hit Publish.
And it didn't work either :(
It should have. The classpath is already set to be relative so it shouldn't need changing unless you move the .fla file.
If you open the compiler error window in Flash you should be able to see where the problem is. I think the problem is with the event names. Lines 95-97 in ModestMapsSample.as should be:
// listen for marker events
map.addEventListener(MarkerEvent.MARKER_CLICK, onMarkerClick);
map.addEventListener(MarkerEvent.MARKER_ROLL_OVER, onMarkerRollOver);
map.addEventListener(MarkerEvent.MARKER_ROLL_OUT, onMarkerRollOut);
These were changed so that they wouldn't clash with MouseEvent's event names, but we forgot to update the flash sample. Sorry, and hope that helps!
I’m ashamed
The company and 1 other person say
this answers the question
-
Inappropriate?Yippee! That was it. Now I'm rolling..
I did encounter a migration warning because I'm using CS4. I'm not quite sure how to follow the instructions provided in the description below. Any suggestions?
Description:
Warning: 1090: Migration issue: The onMouseDown event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( 'mouseDown', callback_handler).
source:
private function onMouseDown(event:MouseEvent):void
I’m thankful, and excited
-
Inappropriate?It's safe to ignore that warning. In actionscript 2 if you had a function named "onMouseDown" it was automatically called. Flash is just reminding you that in actionscript 3 you have to add an event listener to get it to work.
If you want the error to go away you can rename the function inside of MapControls.as (and the corresponding line that adds the event listener), either in the Modest Maps source or you can make your own MapControls class (and style the buttons differently too!).
If you know your way around Flash you might prefer to design your own buttons and wire them up to the map's zoomIn/Out panLeft/Right/Up/Down functions yourself. MapControls is just an example, really, so I wouldn't worry about warnings there.
Loading Profile...



EMPLOYEE