A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: scrollPane

  1. #1
    Senior Member
    Join Date
    Jul 2000
    Posts
    336

    Has anyone gotten the scrollPane component to work?

    I have tried to no avail thus far. I've got a MC ready to go.. I've tried dragging the component onto the MC. I've tried putting the linkage ID for that MC into the scrollPane's properties box. I've also tried loading the MC using AS, with listscroll.scrollContent = "movieclip";

    nothing works so far..

    any hints?

    .fe.

  2. #2
    Member
    Join Date
    Mar 2002
    Posts
    46

    The reference panel is pretty good!

    nig

  3. #3
    Senior Member
    Join Date
    Aug 2000
    Posts
    588
    nig just helped me out with this one yesterday. Try this:

    http://www.philterdesign.com/fla/scrollpane2.zip

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    336

    I got the MC to load into the scrollPane, but now it wont recognize the real size of the MC. The MC contains dynamically loaded MC's, so it does not have a static size. Can I still use the scrollPane?

  5. #5
    Junior Member
    Join Date
    Mar 2000
    Posts
    5
    Originally posted by final_eternity

    I got the MC to load into the scrollPane, but now it wont recognize the real size of the MC. The MC contains dynamically loaded MC's, so it does not have a static size. Can I still use the scrollPane?
    Yup, you can. Figured it out yesterday. User "myPane.refreshPane ()" after all your mcs are placed. It updates the size of the scrollPane.
    My Problem then was, that the dynmic mcs where all resized too. Solved it by rescaling them to 100 in a loop.

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Posts
    336
    I still cant get it to work. The MC is loaded fine within the scrollPane.. when I do myPane.refreshPane(); it doesnt change anything..

    What do you mean by rescaling the MC? After you refresh you do something like movieclip._xscale = 100 and movieclip._yscale = 100;

    Something like that?

    I'd appreciate it if someone could give me a snippet of code..

    thanks

    .fe.

  7. #7
    Senior Member
    Join Date
    Aug 2000
    Posts
    588
    I posted my source about 4 posts above.

  8. #8
    Senior Member
    Join Date
    Jul 2000
    Posts
    336
    I saw that. thanks.

    Only thing is, I cant get mine to work like yours.

    Is there any way you could explain why you did what you did in that example?

    thanks

    .fe.

  9. #9
    Senior Member
    Join Date
    Aug 2000
    Posts
    588
    Sure...

    Here's the code:

    Code:
    myPane.setScrollContent("clipSet");
    var clipSet = myPane.getScrollContent();
    
    for (i=0; i<20; i++) {
    	clipSet.clip.duplicateMovieClip("clip" + i, i+100);
    	clipSet["clip" + i]._y = 20*i;
    }
    clipSet.clip._visible = false;
    myPane.refreshPane();
    First, i set the scroll content of the scroll pane to "clipSet" which is the linkID I set for the scrolled clip in my library. Then, I placed a reference to that clip into a variable called "clipSet".

    From here, I can now duplicate the movie clip that is inside the clip that i've placed as the scroll content, and adjust it's _y a bit.

    Lastly, I just used refreshPane() to refresh the scroll pane, and it works!

  10. #10
    Senior Member
    Join Date
    Jul 2000
    Posts
    336
    Originally posted by phil'ter design
    Sure...

    Here's the code:

    Code:
    myPane.setScrollContent("clipSet");
    var clipSet = myPane.getScrollContent();
    
    for (i=0; i<20; i++) {
    	clipSet.clip.duplicateMovieClip("clip" + i, i+100);
    	clipSet["clip" + i]._y = 20*i;
    }
    clipSet.clip._visible = false;
    myPane.refreshPane();
    First, i set the scroll content of the scroll pane to "clipSet" which is the linkID I set for the scrolled clip in my library. Then, I placed a reference to that clip into a variable called "clipSet".

    From here, I can now duplicate the movie clip that is inside the clip that i've placed as the scroll content, and adjust it's _y a bit.

    Lastly, I just used refreshPane() to refresh the scroll pane, and it works!
    One question what does this piece of code do?

    clipSet.clip._visible = false;

    With this code, are you setting the visibility of the entire movie as false, or the dynamically laoded movies to false.. and why?

    Thanks for your help.

    .fe.

  11. #11
    Senior Member
    Join Date
    Aug 2000
    Posts
    588
    That line of code just sets the visibility of the initial nested movie clip to false (the one i'm using to duplicate). If you omit this line in this example, it won't make a difference because the first duplicated movie clip just covers up that one.

  12. #12
    Junior Member
    Join Date
    Mar 2002
    Posts
    3
    Originally posted by nig

    The reference panel is pretty good!

    nig
    indeed, if you know what you're doing !

    I have only used action scripts in v5 minimally (simple preloads, telltarget, links, etc) so am hardly an expert, but this seems such a simple thing to do but I can't get it to work.

    I have put a scrollpane component on a layer and want it to be populated by a standard movie clip (of a strip of images which will be buttons - nothing difficult to start off with !)... so I presume I just use the MX example of
    'display1.setScrollContent("BetsyTacy");'
    (replacing it with my panename and clipname I presume).

    So I've tried putting this in the propteries box, in the action pane, etc. ...Tried putting the movie clip in as an instance, etc...
    but just end up with a blank scrollpane.

    Any suggestions ?

    PS I've only recently found this board and have already found lots of useful info... and thanks to the people who put up with viryual newbies such as myself !

    beth
    x

  13. #13
    Junior Member
    Join Date
    Mar 2002
    Posts
    3
    whoops, sorted it out now. the only thing I know of changing was that I took out the inverted commas from the previous example, I presumed that I should leave them in.

    I hate having problems with simple stuff :>

    beth

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center