title: Add your Stage in a ScrollWindow ActionScript 3.0
body: <p>I'm gonna try explaining my situation with images, to make sure that everyone will understand what i want to succeed.</p>
  
  <p>First of all i have 3 files:</p>
  
  <p><strong>GenImage.fla</strong> which is linked to class <strong>GeneralImage.as</strong>
  and it only contains the following picture (I tried to make the image Movie Clip but again it's not working):</p>
  
  <p><a href="http://s23.postimg.org/xswcw57fv/Adobe_Flash_Player_17_2015_07_02_at_18_29_22.png" rel="nofollow">Pic1</a></p>
  
  <p>and a file named <strong>ScrollUI.as</strong> which contains the class <strong>ScrollUI</strong>.</p>
  
  <p>What i want to succeed is from my GeneralImage class to create a ScrollUi item, pass the stage, and there create a ScrollPane which makes the picture look like this:</p>
  
  <p><a href="http://s24.postimg.org/qlupnxys5/Adobe_Flash_Player_17_2015_07_02_at_18_31_03.png" rel="nofollow">Pic2</a></p>
  
  <p>The center part of the second image is the ScrollPane Component, which i need to make it Scrollable through the whole image. I managed to get it in my screen but i can't put the Stage in it and make it scrollable.</p>
  
  <p>These are my codes : </p>
  
  <p><strong>GeneralImage.as</strong></p>
  
  <pre><code>package  {
  
      import flash.display.*;
      import flash.events.*;
      import flash.display.Stage;
      import ScrollUI;
  
  
      public class GeneralImage extends MovieClip
      {
  
          public function GeneralImage()
          {
              var k = new ScrollUI();
              k.ScrollConstructor(this);
  
          }
  
      }
  
  }
  </code></pre>
  
  <p><strong>ScrollUI.as</strong></p>
  
  <pre><code>package  
  {
  
      import flash.display.*;
      import flash.events.*;
      import fl.containers.ScrollPane; 
      import fl.events.ScrollEvent;
      import fl.controls.ScrollPolicy; 
  
      public class ScrollUI extends MovieClip
      {
          private var _mainStage:Stage;
          var aBox:MovieClip = new MovieClip(); 
          var aSp:ScrollPane = new ScrollPane();
  
          public function ScrollUI()
          {
          }
  
          function ScrollConstructor(stage:Object):void
          {
              _mainStage = (stage as MovieClip).stage;
              aBox == stage as MovieClip;
              aSp.source == aBox ;
              _mainStage.addChild(aBox);
              aSp.setSize(300,300);
              aSp.move(150, 75); 
              aSp.scrollDrag = true;
              aSp.horizontalScrollPolicy=ScrollPolicy.OFF;
              _mainStage.addChild(aSp);
  
          }
      }
  
  }
  </code></pre>
  
  <p>So what i want it to set the Source of the Scroll Pane ( which is named aSp ) to be the _mainStage which is the stage i get from GeneralImage</p>