I have a list component which contains exhibitors who have rented booths in the floorplan layout…when you mouse over the list, the highlighted exhibitors booth(s) should light up…they do…but they do not highlight back when they are moused out…here is the code I am using to do the highlighting…
var listHandler:Object = new Object();
listHandler.itemRollOver = function(evt_obj:Object)
{
var shp:XMLShape = new XMLShape;
shp.highLight(exList.getItemAt(evt_obj.index).data);
isLight = true;
}
exList.addEventListener("itemRollOver", listHandler);
var listHandler2:Object = new Object();
listHandler2.itemRollOut = function(evt_obj2:Object)
{
var shp:XMLShape = new XMLShape;
shp.hLback(exList.getItemAt(evt_obj2.index).data);
}
exList.addEventListener("itemRollOut", listHandler2);
function highLight(boothArr:Array)
{
trace(boothArr);
for(var i=0; i<boothArr.length; i++)
{
var booth:Number = boothArr*;
var trans1:Transform = new Transform(booths[booth]);
var trans2:Transform = new Transform(miniBooths[booth]);
tempColor = trans1.colorTransform;
var myColor:ColorTransform = new ColorTransform(1, 1, 1, 1, 250, 200, 0, 75);
trans1.colorTransform = trans2.colorTransform = myColor;
}
}
function hLback(boothArr:Array)
{
trace(boothArr);
if(_root.isLight)
{
for(var i=0; i<boothArr.length; i++)
{
var booth:Number = boothArr*;
var trans3:Transform = new Transform(booths[booth]);
var trans4:Transform = new Transform(miniBooths[booth]);
trans3.colorTransform = trans4.colorTransform = tempColor;
}
}
}
the two trace functions there return the same data…so for example when you mouse onto the first element in the list…it will trace “0” then mouse out of the list to not have any selected…and the hLback function will trace “0”…but the color transform back doesnt happen…why?
test it here (launch “07 WIT” for quickest load time)
http://www.expocadvr.com/expocadflashmapdemo/default.html