I have a Flash that has 2 items for use by my Flex app. One is a
flat circle to plot some points on and the other is the dot which
will be those points. In flex I'm duplicating and position these
points from the data within my ArrayCollection. That is woking just
fine, but I have a tooltip on my points that takes a while to
appear. I have a trace on that function that returns the info right
away, but the tooltip is very slow. But if you roll over it anytime
after it has been created the first time it works properly. I think
my AS is bad and was hoping someone could tell me what is wrong.
Here's what I have.
================================
on the Circle I have a function that creates each point -
public function plotRadarPoints() {
for (var i:int=0; i<dates.length; i++) {
...
var obj:Ball = new Ball();
star_mc.parent.addChild(obj);
obj.x = centerX+cX;
obj.y = centerY+cY;
obj.myName = "point " + i;
obj.myDate = cDate.toString();
}
}
=================================
on each point -
package {
import flash.display.MovieClip;
import mx.flash.UIMovieClip;
import flash.events.Event;
[Event(name="bRollOver", type="flash.events.Event")];
public class Ball extends UIMovieClip {
public var myDate:String;
public var myName:String;
public function Ball():void {
super();
addEventListener("mouseOver", dispatchMyEvent);
}
protected function dispatchMyEvent(event:Event):void
{
dispatchEvent(new Event("bRollOver"));
toolTip = myName + "\r" + myDate;
trace(myName + " " + myDate);
}
}
}