1 Reply Latest reply on Jun 4, 2012 7:21 AM by sinious

    different behavior in debug mode

    RadioactiveLizard

      public var Portrat:Loader = new Loader();

       

      Portrat.addEventListener(Event.ADDED, Resize);

      Portrat.load(new URLRequest("images/Map/image.JPG"));

       

      private function Resize(e:Event):void

        {

         Portrat.removeEventListener(Event.ADDED, Resize);

         Portrat.width = 500;

         Portrat.height = 500;

        }

       

       

      this works when i Control+Enter, yet when i enter debug mode it doesn't function properly any reason why?

      i added a trace inside Resize it seems to not even trigger this even in debug

        • 1. Re: different behavior in debug mode
          sinious Most Valuable Participant

          What version of Flash?

           

          Have you overlayed a newer version of Flash Player and AIR over your install? Sometimes people forget to update their FlashPlayer.exe and FlashPlayerDebugger.exe. Then you may get a difference.

           

          Make sure you're in strict mode in your publish settings and keep an eye out for any errors. Make sure you're importing the classes you need to do that as well (flash.display.Loader, flash.net.URLRequest, flash.events.Event)