I have a list of links generated from xml using AS3
function createVideoLinks():void{
for (var i:int=0; i<externalXML.videoClip.length();i++){
vidText*=externalXML.videoClip.vTitle*;
vidLink*=externalXML.videoClip*.@vurl;
var linkHolder:MovieClip = new MovieClip();
var linkText:TextField = new TextField();
linkHolder.addChild(linkText);
addChild(linkHolder);
linkHolder.buttonMode=true; //appears to give me back the correct cursor for links
linkHolder.ref=i;
linkHolder.mouseChildren = false;
linkHolder.addEventListener(MouseEvent.CLICK, clickHandler);
linkHolder.addEventListener(MouseEvent.MOUSE_OVER, overHandler);
}
}
This all works well. When I click on a link I can use
trace ("you are in overHandler="+event.target.ref);
to get the ref number for each link, and so get the link etc etc
WHat I also want to do is change the foramtting of the link when its rollovered/pressed
WHen I roll over I can get the ref number - but how do I target the link I just rolled over
I suppose what I am really asking is in AS2 I would have done something like
createNewMovieCLip (“name”+i…) to give it a unique id and then targetted that.
What’s the as3 equivilent
thanks