0 Replies Latest reply on Aug 15, 2010 4:33 PM by jerry98225

    Flex: Actionscript project swf is not working after export the release build...

    jerry98225 Level 1

      Hi guys..

         I tried to built a project with AS3 only in Flex. When I run the project in flex, everything looks fine, but when I export the release build, the images that are supposed to be added are gone. I appreciate if someone can help me about it.

       

       

       

                init();

       

                  public function init(loadedVideoCount:Number):void{

                 

                  singleHolder=new singleVideoCont();

                  singleHolder.x=loadedVideoCount*singleHolder.width+2;

                  singleHolder.y=6;

                  singleHolder.buttonMode=true;

                  addChild(singleHolder);

                  this.addEventListener(MouseEvent.CLICK,onClick);

                 

                  showTn();

                 

                  }

       

       

       

              private function showTn():void{

                 

                      imgLoader = new Loader();

                      imgLoader.load(new URLRequest(_tnPath));

                              imgLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onProgress);

          imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,onImgLoaded);

                         

       

       

      }

       

       

       

              private function onImgLoaded(event:Event):void {

              singleHolder.progBar.alpha = 0;

                     var image:Bitmap = imgLoader.contentLoaderInfo.content as Bitmap;

                            

                      image.width=TN_WIDTH;

                      image.height=TN_HEIGHT;

                      image.x=3;

                      image.y=3;

                      singleHolder.addChild(image); //this line work when I run the project inside flex but the images are gone when I test my release build...

                     

                      imgLoader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,onProgress);

                      imgLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE,onImgLoaded);

                      //imgLoader = null;

                      }