# Class variables passed into class with labels

**URL:** <https://forum.kirupa.com/t/class-variables-passed-into-class-with-labels/308724>\
**Category:** Uncategorized\
**Created:** [April 28, 2010, 10:06pm UTC](https://forum.kirupa.com/t/class-variables-passed-into-class-with-labels/308724 "2010-04-28T22:06:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjmorga](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jjmorga](https://forum.kirupa.com/u/jjmorga)\
**Post date:** [April 28, 2010, 10:06pm UTC](https://forum.kirupa.com/t/class-variables-passed-into-class-with-labels/308724/1 "2010-04-28T22:06:12Z")

</div>

\*\*Hi,

What is the correct syntax to initiate a function in a class similar to constructing an associative array? I have a function that’s custom variables is ballooning out and I’d like to label them in the call for sanity sake.\*\*

**currently:**  
myClass.myClassFunction(“hello world”,999,0xff0000);

**desired:**  
myClass.myClassFunction(myText:“hello world”,myNumber:999,myColor:0xff0000);

**and the class itself for reference:**  
class com.myClass {  
[INDENT]public var myText:String;  
public var myNumber:Number;  
public var myColor:Number;  
public function myClassFunction(myText:String,myNumber:Number,myColor:Number){

}  
[/INDENT]}

Thanks!

Jacob :stormtrooper:
