Hi I am having problems removing children from my custom
components using “mouseOver” events.
For example – I have an image, and when I
“mouseOver” the image the image changes to another
This works fine, however, the image is also
“clickable” and when clicks opens a new window. This
leaves my image remaining in the “mouseOver” state,
when theoretically is is not in a “mouseOver” state.
I assume the problem occurs due to the fact when the link is
clicked, a new window has been opened therefore the flex app has
lost focus to another window, thus leaving it in the
“mouseOver” state. I have tried to add a
“mouseDown” event to remove the image but I get the
ArgumentError: Error #2025: The supplied DisplayObject must
be a child of the caller.
I am using the following AS within my component:
I embed my images
public var linkClass:Class;
public var linkImg:Sprite;
public var linkOverClass:Class;
public var linkOverImg:Sprite;
set them up
linkImg = new Sprite();
var linkIcon:Bitmap = new linkClass();