Welcome, Guest
  • Author Topic: arrgh! scrollpanes!  (Read 770 times)

    ian

    • Server what's that
    • *
    • Posts: 1
      • View Profile
      • Email
    arrgh! scrollpanes!
    « on: 11/13/02, 13:13 »
    scrollpane woes

    right heres the problem:

    i'm creating a series of mcs ('itemmc') each with a dynamic textbox inside them, inside a holder clip with an instance name of contentmc and setting the holder clip to be the scrollpanes contents. this is all good, and code is below:

    code inside the 'contentmc' holder clip

    for (i=0; i<10; i++) {
    duplicateMovieClip("itemmc", "itemmc"+i, i);
    myitem = eval("itemmc"+i);
    myitem.itemname = "item"+i
    myitem.onRelease = function(){
    trace(this.itemname)
    }
    _root.newheight = newheight + itemmc._height
    myitem._y=myitem._y+(i*itemmc._height)

    }
    itemmc._visible=0;
    _root.contentpane.refreshPane();

    running this code works fine and the scrollbar appears etc etc. The problem is when i play the above code in a try and change the value of 'itemname' using the following function

    function changetext()
    {
    for (i=0; i<10; i++) {
    myitem = eval("itemmc"+i);
    myitem.itemname = "this text has changed"+i

    }
    _root.contentpane.refreshPane();
    }

    when i run this function from a button on the main stage:

    on (release) {
    _root.contentmc.changetext();

    }

    it changes the text on the clips not inside the scrollbar but the ones inside the scrollpane stay as they were, even though i've called refreshpane() to update the text. below is a url demo

    http://www.oxygen24.com/pane.html
    http://www.oxygen24.com/pane.fla

    anyone got any ideas?