# Splitting strings

**URL:** <https://forum.kirupa.com/t/splitting-strings/197156>\
**Category:** flash\
**Created:** [August 14, 2006, 10:56am UTC](https://forum.kirupa.com/t/splitting-strings/197156 "2006-08-14T10:56:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theSchtickler](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@theSchtickler](https://forum.kirupa.com/u/theSchtickler)\
**Post date:** [August 14, 2006, 10:56am UTC](https://forum.kirupa.com/t/splitting-strings/197156/1 "2006-08-14T10:56:14Z")

</div>

Hi there,

I’m having a big issue getting a string to split into two pieces, and I can’t for the life of me work out why. This is a function that is run, with the **midText** var, being a number between 0-100, spat out from a loader. I’ve traced it, and it seems fine, but my splitter function just wont work!

The function works fine if you simple define a var in the code

```auto
function splitter(){
	midText.toString();
	firstSpot = midText.slice(0,1);
	secondSpot = midText.slice(1,2);
}

```

I basically just need to get the percent loaded split into 2 seperate text fields

Anyone ?
