12 Replies Latest reply on Jan 13, 2010 10:50 AM by kglad

    CS3 - run swf from browser

      I have a swf that uses actionscript 3.0 to drag and drop images, activate buttons that run movie clips and manage the display list. It runs flawlessly when I execute it directly (i.e. double-click the swf), but I want to publish it on the web -- so I used File -> Publish to create the necessary html file, but when I run it in a browser (I've only tried IE) the initial screen looks perfect, but none of the buttons and drag and drop features work. Also, when I run the swf using File -> Publish Preview, it fails exactly the same way if I choose HTML, but works perfectly if I choose Flash.
      I created a pared-down version of the fla (see the code below) to try to isolate the problem, and the behavior is exacly the same. I'm attaching the swf and html files for the pared-down version.
      Any ideas?
      ----- actionscript 3.0 code -----
      import flash.display.StageDisplayState;
      import flash.display.Scene;
      import flash.display.MovieClip;
      stage.displayState = StageDisplayState.FULL_SCREEN;
      // for displaying scenario text
      var myTextMovie:MovieClip;
      var myHideTextMovie:MovieClip;
      showtext14_btn.addEventListener(MouseEvent.MOUSE_DOWN, showText);
      function showText(evt:MouseEvent):void {
         myTextMovie = new Myclass14();
         myTextMovie.x = 530;
         myTextMovie.y = 240;