3 Replies Latest reply on Nov 23, 2011 11:58 AM by Ned Murphy

    How do I call up the content in a scrollpane?

    Delirious_GA

      I'm having trouble calling up the content in my scrollpane in a simple quiz application.  I'm a graphic designer so I'm not real proficient with AS3 yet.  I created a scrollpane object called Scroller1 and I'm trying to scroll a movie object called Movie1 inside the scrollpane.  The code I used from the Adobe site calls up an external file, but I want to call up an internal movie so I changed the Scroller1.source = to the movie name, but it doesn't work.

       

      Here is the code I have on the frame that contains the scrollpane:

       

      import fl.events.ScrollEvent;

       

      Scroller1.setSize(300, 200);

       

      function scrollListener(event:ScrollEvent):void {

          trace("horizontalScPosition: " + Scroller1.horizontalScrollPosition + 

           ", verticalScrollPosition = " + Scroller1.verticalScrollPosition);

      };

      Scroller1.addEventListener(ScrollEvent.SCROLL, scrollListener);

       

      function completeListener(event:Event):void {

          trace(event.target.source + " has completed loading.");

      };

      // Add listener.

      Scroller1.addEventListener(Event.COMPLETE, completeListener);

       

      Scroller1.source = "Movie1";

       

      Is there some other way I need to call this up?  The movie is a contents list that has buttons to take you to various frames in the application and it's too long for one page.

       

      Thanks for the help!