Skip navigation
Currently Being Moderated

What's wrong with this bit of code?

Jun 16, 2013 4:11 PM

Tags: #mac #as3 #iphone #3.0 #ios #ipad #action_script_3 #actionscript #flash_professional #actions #cs6 #flash_cs6

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

var my_loader:Loader = new Loader();

my_loader.load(new URLRequest("yout/­5yC_nsDI?version=3"));­function (Event.INIT, onLoaderInit);

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

my_player = my_loader.content; my_player.addEventListener("on­Ready", onPlayerReady);


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


  • Currently Being Moderated
    Jun 16, 2013 4:45 PM   in reply to JoshBurgess

    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/­5yC_nsDI?version=3"));­function (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

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points