Get your own customer support community

Recent activity

Subscribe to this feed
  • question

    nadous replied on May 27, 2009 06:11 to the question "Clickable area with MarkerClip." in Modest Maps:

    nadous
    Hello Chief !
    Well, I fixed the problem and it came back sometimes so I'm not really sure where it's coming from too. I was adding the MarkerClip as a child of the map object, I changed that so it was added to the stage of my class, and the problem was fixed. Then, pursuing the dev of my stuff I had some bugs while I removed some children from my stage (non-MM related), using a try... catch to avoid it, I re-fixed the bug... But no it's not coming from the object I'm attaching to my MarkerClip as it only contains a single shape. I'll keep you in touch as soon as I find precisely where it comes from (an inside bug of mine or a problem with MM). Cheers.
  • question

    nadous asked a question in Modest Maps on May 25, 2009 06:18:

    nadous
    Clickable area with MarkerClip.
    I'm not sure what's wrong with it but I figured out I had a problem with the hittable area for the markers I attached to a single MarkerClip Object. Asking for Flash to show redraw regions, I realized I had an extra hittable era under every marker I attached.



    I was just wondering where that area came from and how it is possible to avoid it, because It makes the under markers insensitive to the mouse.
    Thanks.
  • question

    nadous replied on May 25, 2009 06:08 to the question "How to install Modest Maps in Flash CS3?" in Modest Maps:

    nadous
    Hello. Just download the sources via subversion http://modestmaps.mapstraction.com/tr... and use the publish settings panel (File >> publish settings >> Flash >> settings >> source path) of the flash IDE to add your downloaded folder. You can also use the .swc that come with the downloaded source. In this case, add the .swc to you library path instead of the source path panel.
  • question

    nadous replied on May 21, 2009 10:22 to the question "Is it possible to make draggable markers ?" in Modest Maps:

    nadous
    Alright I continue to respond my own post...
    And I answer to it ! Yes i'ts possible...

    1- in MarkerClip, add listeners and callbacks
    protected function onMarkerUp(event:MouseEvent):void {
    var marker:DisplayObject = event.target as DisplayObject;
    var location:Location = getMarkerLocation(marker);
    dispatchEvent(new MarkerEvent(MarkerEvent.MARKER_UP, marker, location, event.localX, event.localY, true));
    }

    protected function onMarkerDown(event:MouseEvent):void {
    var marker:DisplayObject = event.target as DisplayObject;
    var location:Location = getMarkerLocation(marker);
    dispatchEvent(new MarkerEvent(MarkerEvent.MARKER_DOWN, marker, location, event.localX, event.localY, true));
    }

    2- updates MarkerEvent (forget the IDestroyable Interface, Destroyable object, and destroy method, they came from casalib). I also extend from MouseEvent so I super localX and localY.

    package com.modestmaps.events {
    import com.modestmaps.geo.Location;

    import org.casalib.core.Destroyable;
    import org.casalib.core.IDestroyable;

    import flash.display.DisplayObject;
    import flash.events.MouseEvent;

    public class MarkerEvent extends MouseEvent implements IDestroyable {
    // these are prefixed marker to avoid conflicts with MouseEvent
    public static const MARKER_ROLL_OVER:String = 'markerRollOver';
    public static const MARKER_ROLL_OUT:String = 'markerRollOut';
    public static const MARKER_CLICK:String = 'markerClick';
    public static const MARKER_DOWN:String = 'markerDown';
    public static const MARKER_UP:String = 'markerUp';

    protected var _marker:DisplayObject;
    protected var _location:Location;
    protected var _localX:Number;
    protected var _localY:Number;

    private var destroyable:Destroyable;

    public function MarkerEvent(type:String, marker:DisplayObject, location:Location, localX:Number = 0, localY:Number = 0, bubbles:Boolean = true, cancelable:Boolean = false) {
    super(type, bubbles, cancelable, localX, localY);
    _marker = marker;
    _location = location;
    destroyable = new Destroyable();
    }

    public function get marker():DisplayObject {
    return _marker;
    }

    public function get location():Location {
    return _location;
    }

    public function get destroyed():Boolean {
    return destroyable.destroyed;
    }

    public function destroy():void {
    _marker = null;
    _location = null;
    destroyable.destroy();
    }
    }
    }

    3 back on your main class (Map + MarkerClip + MarkerEvent) I do a simple switch case ;

    var pin:Pin = $evt.marker;

    case MarkerEvent.MARKER_UP :
    pin.stopDrag();
    trace($evt.localX, $evt.localY);
    var p:Point = new Point(mouseX - $evt.localX, mouseY - $evt.localY);
    var loc:Location = minimap.pointLocation(p);
    mrk.setMarkerLocation(pin, new Location(loc.lat, loc.lon));
    mrk.updateClip(pin);
    break;

    You're good to go !
  • question

    nadous replied on May 20, 2009 20:09 to the question "Is it possible to make draggable markers ?" in Modest Maps:

    nadous
    But I'm still stuck... Well in fact it works pretty well excepting the fact that the markers display updates accordingly to the new location only once I panned then released the map, which seems to be a recurrent issue for others (apparently due to a Event.RENDER we need to call somewhere with stage.invalidate() or dirty = true). Well I tried a lot and I could not find the way to fix it. I did not change a lot in MarkerClip.as, I just add a MOUSE_UP and MOUSE_DOWN listener and the callback looks simple ;

    private function onMarkerMouseUp(event:MouseEvent):void {
    stopDrag();
    var marker:DisplayObject = event.target as DisplayObject;
    updateLocation(marker);
    }

    still, the problem remains...
  • question

    nadous replied on May 16, 2009 14:20 to the question "Is it possible to make draggable markers ?" in Modest Maps:

    nadous
    WHO ! I'm sorry to use your time for the previous crap I wrote, I was just NOT using the modified sources when compiling in Flash (while I was coding in FDT with modified sources, so no errors was shawn)...

    Sorry Sorry sorry...
  • question

    nadous asked a question in Modest Maps on May 16, 2009 13:57:

    nadous
    Is it possible to make draggable markers ?
    Hello MM ! I'm trying to make draggable markers for a project by adding some several events type in MarkerEvent (MarkerEvent.MARKER_MOUSE_DOWN + MARKER_MOUSE_UP ) and adding accordingly mouseEvents captured in MarkerClip (then disptaching).

    I also add
    [Event(name="markerMouseUp", type="com.modestmaps.events.MarkerEvent")]
    [Event(name="markerMouseDown", type="com.modestmaps.events.MarkerEvent")]
    in both Map.as and MarkerClip.as.

    But I'm stuck with an error when I try to add my new events type to a markerClip (mrk.addEventListener(MarkerEvent.MARKER_MOUSE_DOWN, this.markerHandler);)

    throw me

    1119: Access of possibly undefined property MARKER_MOUSE_DOWN through a reference with static type Class.
  • question

    nadous replied on April 07, 2009 15:23 to the question "MacMouseWheelHandler on the no-tweenlite branch ; does it work ?" in Modest Maps:

    nadous
    Hi and thanks for the answer. I'm actually in a big rush so I reused the trunk to handle the mouse wheel and I can't say what precisely what was the errors but I can assure you that my FDT pukes me a lot. (probably due to the CDATA stuffs). Anyway...
    I'm not sure that my second problem needs a new topic because it might not come with modestmaps but with SWFobject. I have a full flash problem when I used a full map (map.setSize(stage.stageWidth, stage.stageHeight);). I have a blank swf (not only a blank map) when I embed my movie like this;
    var flashvars = {};
    var params = {menu:"false", quality:"best", allowFullScreen:"true", AllowScriptAccess:"always"};
    var attributes = {id:"movie"};
    swfobject.embedSWF("Movie.swf", "swfContent", "100%", "100%", "9.0.0", false, flashvars, params, attributes);
    swfmacmousewheel.registerObject(attributes.id);

    I can't get it, but it I can set a big map with pixels values, even bigger than my screen resolution and there is no problem. I can also set a map to 100% and n pixels (or the opposite), but not to 100% * 100%.

    As I say, I've a lot of work and I'll try to figure out what the problem came from.

    Cheers.
  • question

    nadous asked a question in Modest Maps on April 04, 2009 21:01:

    nadous
    MacMouseWheelHandler on the no-tweenlite branch ; does it work ?
    Hi there. First of all, thanks for MM, it's a lightweight charm.
    I'm currently using the no-tweenlite branch of MM but I can't get a ride with the macmousewheelhandler method + the earthbrowser script gave me a bunch of errors I fixed (more or less). Is is operational ? Or do we have to use the old one method (pixelbreaker + swfobject) with the trunk branch (as the HelloExtras.as example) ?
    Last and least [Beginner Question] I go far on my project but now I'm stuck cause I can't display anything on a html page. FireBug says the tiles load properly but I have a blank swf (I use an OpenStreetMapProvider). Any Idea ?