# Proper Syntax - Properties from Construct

**URL:** <https://forum.kirupa.com/t/proper-syntax-properties-from-construct/295128>\
**Category:** flash\
**Created:** [August 25, 2009, 6:34pm UTC](https://forum.kirupa.com/t/proper-syntax-properties-from-construct/295128 "2009-08-25T18:34:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenBart](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@BenBart](https://forum.kirupa.com/u/BenBart)\
**Post date:** [August 25, 2009, 6:34pm UTC](https://forum.kirupa.com/t/proper-syntax-properties-from-construct/295128/1 "2009-08-25T18:34:33Z")

</div>

How do you properly set a public variable or property in a construct?  
I’m pretty sure this is the wrong way of going about it:

```auto
 private var subNavLoader:Loader = new Loader();
         public var type:String;
         public var w:Number;
         public var h:Number;
         public var path:String;
         
         public function SubNavIcon(thumbPath:String, myPath:String, myType:String, myWidth:Number, myHeight:Number):void
         {
            subNavLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, displayIcon);
            subNavLoader.load(new URLRequest(thumbPath));
            trace("loading: ", thumbPath);
             
            type = myType; 
            w = myWidth;
            h = myHeight;
            path = myPath;
         }

```
