# Creating an Object from text input

**URL:** <https://forum.kirupa.com/t/creating-an-object-from-text-input/6814>\
**Category:** flash\
**Created:** [October 16, 2002, 11:32pm UTC](https://forum.kirupa.com/t/creating-an-object-from-text-input/6814 "2002-10-16T23:32:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yellowjacket](https://avatars.discourse-cdn.com/v4/letter/y/f05b48/32.png) [@yellowjacket](https://forum.kirupa.com/u/yellowjacket)\
**Post date:** [October 16, 2002, 11:32pm UTC](https://forum.kirupa.com/t/creating-an-object-from-text-input/6814/1 "2002-10-16T23:32:38Z")

</div>

I’m trying to build an object object from input text. I can load the information into a variable using LoadVar with no problem but when I load that information into an object ( object {}😉 Flash does not recognize the object as on object.

Any ideas?

Yellow jacket

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 17, 2002, 12:17am UTC](https://forum.kirupa.com/t/creating-an-object-from-text-input/6814/2 "2002-10-17T00:17:21Z")

</div>

object is a key word and is the basic building block for a large amount of flash. name it something else.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 17, 2002, 2:34am UTC](https://forum.kirupa.com/t/creating-an-object-from-text-input/6814/3 "2002-10-17T02:34:29Z")

</div>

I guess that my example is not clear. I am using the object initializer which has the syntax of object {};  
and I am trying to get my input string e.g.

instr={prop1:value1,prop2:value2…propn:valuen}

into an object so that I can reference

instr.prop1, etc, and get the value of the properties

Does this make sense?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 17, 2002, 9:03am UTC](https://forum.kirupa.com/t/creating-an-object-from-text-input/6814/4 "2002-10-17T09:03:05Z")

</div>

Well, if I understand what you’re trying to do, you want to loadVars into an object, right?

```auto
myLV.onLoad=function(){
    myObject={};
    myObject.prop1=this.value1;
    // etc.
}

```

This should work, I think.

pom :cowboy:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 17, 2002, 1:47pm UTC](https://forum.kirupa.com/t/creating-an-object-from-text-input/6814/5 "2002-10-17T13:47:34Z")

</div>

That’s it!

thanks

Yellowjacket.
