1 Reply Latest reply on Jun 16, 2013 4:45 PM by Ned Murphy

    What's wrong with this bit of code?

    JoshBurgess

      Security.allowDomain("you/tube.com"); var my_player:Object;

      var my_loader:Loader = new Loader();

      my_loader.load(new URLRequest("yout/ube.com/v/xe95yC_nsDI?version=3"));

      my_loader=.contentLoaderInfo.adfunction (Event.INIT, onLoaderInit);

      function onLoaderInit(e:Event):void{ addChild(my_loader);

      my_player = my_loader.content; my_player.addEventListener("onReady", onPlayerReady);

      }

      function onPlayerReady(e:Event):void{ my_player.setSize(520,290);

      }

        • 1. Re: What's wrong with this bit of code?
          Ned Murphy Adobe Community Professional & MVP

          If you want help troubleshooting code you should present it properly formatted with indentation and separate lines for separate actions.

           

          I see a number of errors in these two lines alone...

           

          my_loader.load(new URLRequest("yout/ube.com/v/xe95yC_nsDI?version=3"));

          my_loader=.contentLoaderInfo.adfunction (Event.INIT, onLoaderInit);

           

          1) that cannot be a valid youtube address with the slash in it

           

          2) that dot leading contentLoaderInfo is an error

           

          3) I don't know of any method called adfunction, and if I paste that line it changes to something with a dash in that method name