3 Replies Latest reply on Jan 13, 2011 12:17 PM by Ned Murphy

    Change HTML background color with AS3


      Hi all,


      I'm looking or a way to change my HTML background color trough Flash.


      The problem is it's not working any ideas? here is the code i'm using



      <script language="JavaScript">
      function changeBgColor(newBgColor)
      if (window.document && window.document.bgColor)
              document.bgColor = newBgColor;


      Flash document

      import flash.external.*;


      var jsCall:String;
      this.addEventListener(Event.ENTER_FRAME, bgChange)


      function bgChange(e:Event):void{
          jsCall = String(ExternalInterface.call("changeBgColor", "#FF0000"));


      best regards!!!