# You too can Associative Array Reference! (But can I?)

**URL:** <https://forum.kirupa.com/t/you-too-can-associative-array-reference-but-can-i/30885>\
**Category:** flash\
**Created:** [September 15, 2003, 7:24pm UTC](https://forum.kirupa.com/t/you-too-can-associative-array-reference-but-can-i/30885 "2003-09-15T19:24:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lrhb](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lrhb](https://forum.kirupa.com/u/lrhb)\
**Post date:** [September 15, 2003, 7:24pm UTC](https://forum.kirupa.com/t/you-too-can-associative-array-reference-but-can-i/30885/1 "2003-09-15T19:24:00Z")

</div>

Hi there!

I’m trying to dynamically define some variables but I seem to be doing something wrong…

[AS]function placeData(color){  
plinky[“color”] = new Array();  
plinky[“color”]name = “angry”;  
}

plinky = new Object();  
results = placeData(red);

trace(results);[/AS]

trace (results) should give back “angry”, but alas, I get the following message:

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 3: ‘;’ expected  
plinky[“color”]name = “angry”;

At the moment, I am the captain of malformating! Any assistance and advice would be greatly appreciated!

Thanks! :hat:

lrhb
