3 Replies Latest reply on Sep 27, 2011 4:19 AM by Raghuvasa

    How to assign image source in ActionScript

    Maximist Level 1

      Hallo. I have an image:


      <mx:Image id="myImage"/>


      If I assign the source for this image in this way:


      this.myImage.source = "/myFolder/images/myImage.png";    // This works



      But, if i assign my source in this way:


      public var myVar:String = "/myFolder/images/";



      this.myImage.source = myVar + 'myImage.png';   // this does not works



      Why the first way works good and the second not??.. Are they not equivalent?


      Thx for all