problem with locationPoint()
i tried getting mapLocation points using locationPoint() but something more than -630 disappears out of the screen. i think the maps in AS3 has its registration point at the topLeft that means my points with y-coordinate less then zero should move out of the topmost screen but it moves out when my screen location y-coordinate is about -630. is any thing going wrong in my code ?
Follow this discussion to get notifications on your dashboard.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Maybe try posting your code and an example swf so we can see what's going wrong? It's very hard to guess what's up from your description.
-
Inappropriate?my code might me mixed up but still here is the code of the function that i have modified. hope u understand it.
public function redrawPoly(firstDrawFlag:Boolean):void
{
var thisObj = this;
polyCont.scaleX = polyCont.scaleY = 1.0;
polyCont.x = map.stage.stageWidth/2;
polyCont.y = map.stage.stageHeight/2;
polySprite.x = map.stage.stageWidth/2;
polySprite.y = map.stage.stageHeight/2;
polySprite.graphics.clear();
polySprite.graphics.lineStyle(3,0xFF0000,1);
locPoint = map.locationPoint(pathArray[0],polySprite);
polySprite.graphics.moveTo(locPoint.x,locPoint.y);
var myTimer:Timer;// = new Timer (50,(pathArray.length-1));
if(firstDrawFlag)
{
myTimer = new Timer (100,(pathArray.length-1));
myTimer.addEventListener(TimerEvent.TIMER, timeHandler);
myTimer.reset();
myTimer.start();
}
function timeHandler(e:TimerEvent):void
{
locPoint = thisObj.map.locationPoint(thisObj.pathArray[(myTimer.currentCount)],thisObj.polySprite);
if(locPoint.y<-630>);
}
}
I’m sad
Loading Profile...



EMPLOYEE