A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: "Many pictures+some text in scrollpane" please help

  1. #1
    Junior Member
    Join Date
    Aug 2001

    Please help me solving what to me is a huge problem.
    I've browsed through every post here and on were-here on the scrollpane, but not found anything about my problem.

    I'm trying to do a scrollpane with about 30 pictures, every picture has a short description text beside it.
    I've done it by importing all pictures and made a huge movieclip with all 30 pictures in it.. and as you know to handle that movieclip is anyting but easy since it's so long it goes far outside the document and it doesn't really work well..

    I realise that this isn't a good way to do this.. i think it should be better to just have a text or xml file with the pictures that should be loaded and the text attached to each picture, but i don't have the skills to set that up
    So if someone would/could help me out on this one i would be really happy.

    I need my movie to have these preferences:
    * scrollpane and movie widh/height 388x280
    * 30 (could be more and less) pictures 188x141 pixels
    * Each text should have a 150pixel wide and 3 pixel thick dotted line above it. (which would be great to change color on through the preference file when needed)
    * A bonus would be to change the colors on the actual scroll buttons and bar through this preference file.

    Here is a dummy of how i want it to look like (only 10pictures in this one)
    Dummy file

    Here is my dummy files zipped with the 10 test pictures if someone want to try and make a better solution.
    Dummy files zipped

    Any help is highly appreciated

    Best regards / Jmx

  2. #2
    Senior Member
    Join Date
    Feb 2002
    Hi friend...
    I understood your problem, and I suggest that you take two steps:
    - create a generic mc that will get the data of one pic (and the pic sure) and will be responsible of showing these data.
    - put all those small mcs together and show them in the scrollpane.

    a generic mc could be an mc with another empty mc inside it, name this empty mc "pic", and beside it put a dynamic text field name it "myTxt", above these put the dotted line (or whatever).
    put this code on frame 5 of this mc:
    myTxt = txtData
    now you link that mc by assigning a linkage name in the library, example "showMC".

    you can load your data from a text file. then you have to write this file in a certain manner, so that it could be read by Flash.. like this:
    &text1=this is a dummy text that will behave as a sample.
    &text2=this is a dummy text that will behave as a sample.
    &text3=this is a dummy text that will behave as a sample.
    in Flash you put this code on the first frame:
    //load the .txt file
    //make a for loop to read the file and attach the generic mcs you created earlier to the stage:
    for (var i=1; i<10; i++){
        if (_root["image"+i] != null){
            _root.attachMovie("showMC", "show"+i, i);
            _root["show"+i]._y += 141*i;
            _root["show"+i].fileName = _root["image"+i];
            _root["show"+i].txtData = _root["text"+i];
    now when you run this you'll have a group of mcs under each other. you can load all this swf inside a scrollpane in another movie.

    that's all.
    if you needed further assistant mail me kingmaks@yahoo.com

    best regards..

  3. #3
    Junior Member
    Join Date
    Aug 2001
    Thank you Saleh for your help,

    I don't seem to have any luck getting your suggestion to work
    It doesn't seem to attach the clip to the stage?
    I leave the door open for my own errors ofcourse

    If you or anyone else could make a little demo of this i would be very happy.

    Again thank you for your help

    Best regards / Jmx

  4. #4
    Junior Member
    Join Date
    Aug 2001
    Does anyone else have some input to this?
    I've been testing and testing.. i just don't seem to get it right

    Best regards / Jmx

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