# Scenes and textfield

**URL:** <https://forum.kirupa.com/t/scenes-and-textfield/182737>\
**Category:** flash\
**Created:** [March 21, 2006, 3:23am UTC](https://forum.kirupa.com/t/scenes-and-textfield/182737 "2006-03-21T03:23:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonytsou912](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@tonytsou912](https://forum.kirupa.com/u/tonytsou912)\
**Post date:** [March 21, 2006, 3:23am UTC](https://forum.kirupa.com/t/scenes-and-textfield/182737/1 "2006-03-21T03:23:07Z")

</div>

I used the following actionscripting codes to create a textfield in one of my scenes and somehow it “carries through” to the next scenes. Is there anyway I can stop that and limit it to only effective in one specific scene? THANK YOU!  
**[FONT=Courier New][/FONT]**  
[FONT=Courier New] **var** [COLOR=black] characters:[/COLOR][/FONT][COLOR=blue][FONT=Courier New]Array[/FONT][/COLOR][COLOR=black][FONT=Courier New] = **new** [/FONT][/COLOR][COLOR=blue][FONT=Courier New]String[/FONT][/COLOR][COLOR=black][FONT=Courier New]([/FONT][/COLOR][COLOR=red][FONT=Courier New]“kirupa”[/FONT][/COLOR][COLOR=black][FONT=Courier New]).[/FONT][/COLOR][COLOR=blue][FONT=Courier New]split[/FONT][/COLOR][COLOR=black][FONT=Courier New]([/FONT][/COLOR][COLOR=red][FONT=Courier New]""[/FONT][/COLOR][COLOR=black][FONT=Courier New]);  
[/FONT][/COLOR][COLOR=blue][FONT=Courier New]this[/FONT][/COLOR][COLOR=black][FONT=Courier New].[/FONT][/COLOR][COLOR=blue][FONT=Courier New]createTextField[/FONT][/COLOR][COLOR=black][FONT=Courier New]([/FONT][/COLOR][COLOR=red][FONT=Courier New]“txt”[/FONT][/COLOR][COLOR=black][FONT=Courier New], [/FONT][/COLOR][COLOR=navy][FONT=Courier New]1[/FONT][/COLOR][COLOR=black][FONT=Courier New], [/FONT][/COLOR][COLOR=navy][FONT=Courier New]10[/FONT][/COLOR][COLOR=black][FONT=Courier New], [/FONT][/COLOR][COLOR=navy][FONT=Courier New]10[/FONT][/COLOR][COLOR=black][FONT=Courier New], [/FONT][/COLOR][COLOR=navy][FONT=Courier New]150[/FONT][/COLOR][COLOR=black][FONT=Courier New], [/FONT][/COLOR][COLOR=navy][FONT=Courier New]22[/FONT][/COLOR][COLOR=black][FONT=Courier New]);  
txt.[/FONT][/COLOR][COLOR=blue][FONT=Courier New]border[/FONT][/COLOR][COLOR=black][FONT=Courier New] = **true** ;  
[/FONT][/COLOR][COLOR=blue][FONT=Courier New]Key[/FONT][/COLOR][COLOR=black][FONT=Courier New].[/FONT][/COLOR][COLOR=blue][FONT=Courier New]addListener[/FONT][/COLOR][COLOR=black]FONT=Courier New;  
txt.[/FONT][/COLOR][COLOR=blue][FONT=Courier New]onKeyDown[/FONT][/COLOR][COLOR=black][FONT=Courier New] = **function** ():[/FONT][/COLOR][COLOR=blue][FONT=Courier New]Void[/FONT][/COLOR][COLOR=black][FONT=Courier New] {  
[/FONT][/COLOR][COLOR=blue][FONT=Courier New]if[/FONT][/COLOR][COLOR=black][FONT=Courier New] ([/FONT][/COLOR][COLOR=blue][FONT=Courier New]String[/FONT][/COLOR][COLOR=black][FONT=Courier New].[/FONT][/COLOR][COLOR=blue][FONT=Courier New]fromCharCode[/FONT][/COLOR][COLOR=black][FONT=Courier New]([/FONT][/COLOR][COLOR=blue][FONT=Courier New]Key[/FONT][/COLOR][COLOR=black][FONT=Courier New].[/FONT][/COLOR][COLOR=blue][FONT=Courier New]getCode[/FONT][/COLOR][COLOR=black]FONT=Courier New).[/FONT][/COLOR][COLOR=blue][FONT=Courier New]toLowerCase[/FONT][/COLOR][COLOR=black]FONT=Courier New == characters[txt.[/FONT][/COLOR][COLOR=blue][FONT=Courier New]length[/FONT][/COLOR][COLOR=black][FONT=Courier New]]) {  
txt.[/FONT][/COLOR][COLOR=blue][FONT=Courier New]text[/FONT][/COLOR][COLOR=black][FONT=Courier New] += [/FONT][/COLOR][COLOR=blue][FONT=Courier New]String[/FONT][/COLOR][COLOR=black][FONT=Courier New].[/FONT][/COLOR][COLOR=blue][FONT=Courier New]fromCharCode[/FONT][/COLOR][COLOR=black][FONT=Courier New]([/FONT][/COLOR][COLOR=blue][FONT=Courier New]Key[/FONT][/COLOR][COLOR=black][FONT=Courier New].[/FONT][/COLOR][COLOR=blue][FONT=Courier New]getCode[/FONT][/COLOR][COLOR=black]FONT=Courier New);  
}  
}[/FONT][/COLOR]

---

<div class="post-metadata">

**Author:** ![tonytsou912](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@tonytsou912](https://forum.kirupa.com/u/tonytsou912)\
**Post date:** [March 22, 2006, 6:05am UTC](https://forum.kirupa.com/t/scenes-and-textfield/182737/2 "2006-03-22T06:05:47Z")

</div>

Someone please help! :d:
