# TextField navigation index?

**URL:** <https://forum.kirupa.com/t/textfield-navigation-index/298095>\
**Category:** flash\
**Created:** [October 13, 2009, 4:58pm UTC](https://forum.kirupa.com/t/textfield-navigation-index/298095 "2009-10-13T16:58:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dobe](https://avatars.discourse-cdn.com/v4/letter/d/e480ec/32.png) [@dobe](https://forum.kirupa.com/u/dobe)\
**Post date:** [October 13, 2009, 4:58pm UTC](https://forum.kirupa.com/t/textfield-navigation-index/298095/1 "2009-10-13T16:58:02Z")

</div>

Hi. I’m new to ActionScript and I’m having trouble creating a navigational index for my company’s catalog. I’ve created 6 dynamic TextFields on the stage, given each of them a unique instance name (one, two, three, etc.) and have assigned to each of them the same eventListener and pageJump function via AS. My intent is to allow a user to jump to a specific page by clicking on the corresponding TextField. My question is how do I tell the function which TextField has been clicked? Nothing I’ve tried has worked thus far. If there’s a better way to go about this please let me know.  
Thanks!

[COLOR=DarkSlateBlue]var navList:Array = new Array(one,two,three,four,five,six);

function setFieldParam():void {  
var i:int = 0;  
while (i \< 6){  
navList\*.selectable = false;  
navList\*.addEventListener(MouseEvent.CLICK, pageJump);  
navList\*.setTextFormat(normal);  
i++;  
}  
}

setFieldParam();

function pageJump(evt:MouseEvent):void {  
[/COLOR][SIZE=3][COLOR=Magenta]page = int(the text value of whichever TextField is clicked);[/COLOR][/SIZE][COLOR=DarkSlateBlue]  
var imageRequest:URLRequest = new URLRequest(catalog[page]);  
var imageLoader:Loader = new Loader ();  
imageLoader.load(imageRequest);  
addChild(imageLoader);  
imageLoader.x = 54;  
imageLoader.y = 15;  
buttonCtrl();  
setFieldParam();  
navStatus();  
}[/COLOR]
