1 Reply Latest reply on Sep 28, 2009 10:30 PM by Saransoft84

    how to open an swf in its own window outside flash using button

    uptoppapi

      how do I open an swf in its own window outside the flash using button?

        • 1. Re: how to open an swf in its own window outside flash using button
          Saransoft84 Level 3

          Hi,

           

          Try this code:

           

          import mx.containers.Window;

           

          var my_button:mx.controls.Button;

           

          var buttonListener:Object = new Object();

           

          buttonListener.click = function(evt_obj:Object) {

          var my_win:MovieClip = mx.managers.PopUpManager.createPopUp(evt_obj.target, Window, true, {title:"Sample Image", contentPath:"uganda_animation_Scene 1.swf"});

          my_win.setSize(320, 240);

          };

          my_button.addEventListener("click", buttonListener);

          You must drag the window default component and place in to the library.
          Saransoft