Some extra info to facilitate any response,
so I have a container for the timeslots :
<mx:HBox id="timeSlotContainer" horizontalGap="0" mouseEnabled="false"
mouseFocusEnabled="false" />
//-----------------------------------------------------------------------
and a function to create the timeslots:
private function createTimeslots():void
{
var timeSlots_ar:Array =
["6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21"
,"22","23","0","1","2","3","4","5"];
var nbTimeSlots:int = timeSlots_ar.length;
for(var t:int=0; t<nbTimeSlots; t++){
var ts:EPGTimeslot = new EPGTimeslot();
LineDrawer.drawDottedVerticalLineTo(ts.graphics, 0x666666, -1, 20,
330);
ts.timeNotation = timeSlots_ar[t]+":00";
timeSlotContainer.addChild(ts);
}
}
//-----------------------------------------------------------------------
EPGTimeslot is this:
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> "
height="322"
width="120"
verticalAlign="top" mouseEnabled="false" mouseFocusEnabled="false">
<mx:Label text="{timeNotation}" styleName="greyLabel" />
<mx:Script>
<![CDATA[
private var _timeNotation:String="";
public function set timeNotation(_timeNotation:String):void
{
this._timeNotation = _timeNotation;
}
[Bindable]
public function get timeNotation():String
{
return _timeNotation;
}
]]>
</mx:Script>
</mx:HBox>
//-----------------------------------------------------------------------
and the static function in the LineDrawer class is :
public static function drawDottedVerticalLineTo(
g:Graphics,
dotColor:uint,
x : Number,
yStart : Number,
yEnd : Number
) : void
{
g.lineStyle(0,0xff0000,0); // invisible line (!)
g.moveTo(x, yStart);
for( var y : Number = yStart; y < yEnd; y += 1)
{
if( y % 2 == 0 )
{
// lines are too fat, so we draw a square of 1 pixel (!)
g.beginFill(dotColor, 1);
g.lineTo(x+1, y );
g.lineTo(x+1, y+1 );
g.lineTo(x, y+1 );
g.lineTo(x, y );
g.endFill();
g.moveTo( x, y + 1 );
}
else
{
g.moveTo( x, y + 1 );
}
}
}
What I want is to avoid a mouseOut below when rolling over a dotted line,
thanks in advance.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Van De Velde Hans
Sent: maandag 11 december 2006 18:32
To: '[email protected]'
Subject: [flexcoders] How to disable a mouse over?
Hi,
I have a whole list of clickable boxes and I draw grid lines over these
boxes.
Problem : when I mouseOver the grid lines with the mouse, it causes a
mouseOut on the boxes below.
Check <http://www.belgacom.tv> www.belgacom.tv > chose English > Maximize
"my TV guide" portlet window :
>>>>> when you mouseOver a grid line cutting a program box, it causes a
mouseOut on that program box :-(
Is there a way to completely ignore the mouseOver on the drawn grid lines?
To draw the vertical grid lines, I put an HBox above the boxes & I'm drawing
the lines with code inside that HBox.
I've tried setting mouseEnabled and mouseFocusEnabled to false, but no luck.
Setting enabled to false completely blocks all mouseOvers below.
Thx,
Hans.