# Help required..Whats wrong in this code?

**URL:** <https://forum.kirupa.com/t/help-required-whats-wrong-in-this-code/205726>\
**Category:** flash\
**Created:** [November 1, 2006, 12:01pm UTC](https://forum.kirupa.com/t/help-required-whats-wrong-in-this-code/205726 "2006-11-01T12:01:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmukunth](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@jmukunth](https://forum.kirupa.com/u/jmukunth)\
**Post date:** [November 1, 2006, 12:01pm UTC](https://forum.kirupa.com/t/help-required-whats-wrong-in-this-code/205726/1 "2006-11-01T12:01:18Z")

</div>

Hi,

[COLOR=“Blue”]var mylabel:TextField;  
var mylabelid:String;  
var cnt = 0;  
for(var a=0;a\<=rows;a++)  
{  
for(var b=0;b\<cols;b++)  
{   
cnt ++;  
//trace(cnt);  
mylabelid = “mylabel”+cnt;  
trace(mylabelid);

```
			mylabel = this._root.createTextField(mylabelid,cnt, aa, bb, cellWi, cellHi);
			trace("Label " + mylabel); // **[COLOR="Red"]Error : Label 'Undefined'[/COLOR]**
			mylabel.setNewTextFormat(txtformat);
			trace("X : " + aa);
			trace("Y : "+bb);
			
			mylabel.text = b;
			aa = aa + cellWi;
		}
		aa = x;
		bb = y + (a * cellHi);
		trace("Row: " + a);
	}
	
	
[/COLOR]

```

I dont what goes wrong. I tried this coding in Flash lite 2.0. In normal desktop flash document it is working fine. But in Mobile application it gives the error **[COLOR="#ff0000"]‘Undefined’[/COLOR]** for the Textfields created…

I dont know what went wrong in my code… Anyone help me?

**[SIZE=“4”][COLOR=“Blue”]Note : I have used in the above code in the Flash Lite 2.0 actionscript(I need to develop for the Windows mobile devices) NOT in normal Flash 8[/COLOR][/SIZE]**

Anyone please help me…

Thankfully,  
jmukunth.
