2 Replies Latest reply on Oct 6, 2009 11:32 AM by Revlex

    Image to movieclip dont display data

    Revlex

      Hi all,

       

      Ive searched quite a bid arround the web(Google, Bing and stuff), chekked here the FAQ and the former threads in the search.

      my problem is my script doest show anny picture os data.

       

      This are the sympthons: The image is loaded correctly(shows a picture when i add it to a image container) Also my shape work a lil bit gus it say in a Alert.show function it has a shape object. the img.addChild(lader.content); also works fine.

      It goes horribly wrong on this to lines   bla.addChild(img); and stage.addChild(bla);.

       

      I hope someone can point me in the right derection.

       

      here's my code:

       

                  private function initVars():void
                  {
                      lader.load(uri);
                      lader.contentLoaderInfo.addEventListener(Event.COMPLETE, doe_iets);
                  }
                 
                  private function doe_iets(evt:Event):void
                  {
                      var round_rect:Shape = new Shape();
                      
                      round_rect.graphics.beginFill(0xFF00FF);
                      round_rect.graphics.lineStyle(3, 0xFF0000);
                      round_rect.graphics.drawRoundRect(10,10,300,200,10,10);
                      round_rect.graphics.endFill();
                      lader.mask = round_rect;
                      
                      img.addChild(lader.content);
                                  
                      bla.addChild(img);
                      stage.addChild(bla);
                  }