15 Replies Latest reply on Nov 2, 2007 8:57 AM by kglad

    Printing content of embedded swf from main environment swf

    TerryCQ4
      I am using Flash Professional 8 to develop, and player 8 to view published swf files in an html window. I have looked through the posts, but nothing seems to apply.

      OVERVIEW:
      I have a main environment which contains a graphical banner, back and next arrows, and a 'Print' popup containing a number of buttons with print code on them. The main environment loads each actual screen of content from separate swf files (path is: screens/screen1.swf).


      The following code (on the first frame of main timeline) worked when everything was in one fla file, but no matter what I try, I can't get the correct syntax to work when the movie is in another swf file:

      Key.addListener(myListener);

      _global.p_sec_1 = _root.attachMovie("printable_screen1", "psection1",100);
      _global.p_sec_2 = _root.attachMovie("printable_screen2","psection2", 101);
      _global.p_sec_3 = _root.attachMovie("printable_screen3","psection3", 102);


      _root.psection1._visible = false;
      _root.psection2._visible= false;
      _root.psection3._visible= false;


      This code was on the button to call the print function:

      on (release) {
      printAsBitmap("_root.psection1", "bmovie");
      }


      MY PROBLEM:
      I can't figure out the action script code needed to direct the code (located on the print button in the environment) to print the movie clip when it is in an embedded swf.

      I would really appreciate it if anyone knows what I would need to replace '_root' with. I have tried the path 'screens/screen1.swf' and a few other things, but am stuck.

      Signed, an action script novice.

      Thanks