Current Position:Home > How do I call up the content in a scrollpane?

How do I call up the content in a scrollpane?

Update:11-30Source: network consolidation
Advertisement
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!

The Best Answer

Advertisement
If the Movie1 object is on the stage and you have assigned it the instance name "Movie1" (in the Properties panel), then it should be loaded into the scrollpane if you use...
Scroller1.source = Movie1;
  • How do I call up the content in a scrollpane? Update:11-30

    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 M

  • Is there a way to unload content from a scrollpane componant? Update:11-30

    Hello, There's is probably an easy answer to this but i'm new to web design and probably took the hard road with using Flash CS4. My problem is that i have text imported from Photoshop as a movieclip loading into a scrollpane which works the way i wa

  • Scroll Pane content doesn't work Update:10-11

    ok, so i've got a movie with a scrollpane (god these things are a hassle) on the stage. the movie tells the scrollpage to load content from an outside swf called testes.swf (short for testimonials). in testes.swf, there are a series of invisable butt

  • How can I force a specific content size in a ScrollPane? -- REPOST Update:10-11

    See http://www.seanberry.com/scrollPaneInTheAss.html for reference Have an interesting situation here. I am using a scrollpane to hold a loaded movieclip (scrollContent_mc for reference) which contains several mask/image combinations. The images with

  • How can I force a specific content size in a ScrollPane -- Repost   from actionscript group Update:10-11

    Haven't gotten any answers in the actionscript group, so maybe I will fair better here... See http://www.seanberry.com/scrollPaneInTheAss.html for reference Have an interesting situation here. I am using a scrollpane to hold a loaded movieclip (scrol

  • Controlling content height in the scrollpane component Update:11-30

    I'm using the scrollpane component to display content, within the content movie clips, are swf animations that are being imported using targets. Some of the animation's parts go far beyond the height of the stage, causing the scrollpane to adjust for

  • ScrollPane: thumb doesn't get updated after contents of scrollpane change Update:11-30

    Hi, I some content in a scrollpane. The horizontal scrollbar(thumb) is showing because the content is to big to fit horizontally. The problem is if the content changes, i.e. gets smaller for example, the scrollbars don't get updated. Only after touch

  • Help with multiple flash movies in same website Update:10-11

    I'm trying to create a website in dreamweaver. I created the artwork in fireworks. a slice of it i exported to flash to create rolling clouds over the background. i also want in the same swf file a screen for my main content. ( I used a scrollPane co

  • Updating a JFrame Update:11-30

    Hi all, I've got a problem (ya, another :P). I made a JFrame with a JPanel into it. But when i pressed a button, the ContentPane clears and the JPanel get a new content. But the problem is: When i pressed the button, it works. Well, i have to resize

  • Accessing a Panel being used in a ScrollPane Update:11-30

    Hey all. I'm having trouble accessing a Panel that I am placing inside a ScrollPane. I am getting a ClassCastException, trying to cast a JTextArea to an extension of JFrame. I make the content of the ScrollPane using this code: switch(jComboBox2.getS