A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Scrooling Pictures

  1. #1
    Member
    Join Date
    Jun 2005
    Posts
    69

    Scrooling Pictures

    Hello there!!!
    Can anybody please help n how to do a scrolling image,i want to use like 10 or 15 pictures but i don want to take to much space on my website and i want to do one like scroll to left when you click on an arrow and to right too.
    please any help or tutorial will be apreciat it.
    thank you
    here a link of an example what i want to do.
    http://www.saltlageret.dk/

  2. #2
    Flash developer
    Join Date
    Dec 2007
    Posts
    26
    Put the images into one movieclip and then attach code to it that will make it move. Something like:

    PHP Code:
    onClipEvent(enterFrame){
    if(
    _x-(Stage.width/2-_root._xmouse)/100
    >&& _x<800-(Stage.width/2-_root._xmouse)/100
    ){
    _x-=(Stage.width/2-_root._xmouse)/100
    }


  3. #3
    Member
    Join Date
    Jun 2005
    Posts
    69
    could you tell me please step by step if u don`t mind,please!!!!

  4. #4
    Member
    Join Date
    Jun 2005
    Posts
    69
    let me explain to you what i want to do.
    first,i want to have all the pictures in one large box where on each ends have an arrow to scroll the pictures to left and right and when u click on each of them it will appear some info.
    please help me on this.
    thank you

  5. #5
    Flash developer
    Join Date
    Dec 2007
    Posts
    26
    hi,

    I've just noticed as this is in AS3 forum, are you planning on making this using AS3? If so I can't really help you and I'm sorry to have posted in the wrong place.

    For something as simple as this it's probably better to start off with AS2, especially if you're a beginner. How much Actionscript do you know? Just so I know how much detail I should go into

  6. #6
    Senior Member
    Join Date
    Jan 2008
    Posts
    150
    Make a movie clip.
    Add each image into the it in a line, like if it were film or something.
    Have your arrows move it left or right 'x' pixels, where x is the width of a picture.

    If you are close to either end of the clip but want it to keep looping then copy it and place the copy next to the original and just move both of them at the same time.
    ...then probably get rid of the original so you don't end up with 30,000 movie clips if people kept scrolling in one direction.

  7. #7
    Member
    Join Date
    Jun 2005
    Posts
    69
    Hello!!!
    Actually i`m not good at AS. but i did some training with AS2
    but i can do the basic things for a website,but this is a bit far away from expert in that.
    So if could you give me the details step but step that will be really great.
    thank you.

  8. #8
    Senior Member
    Join Date
    Jan 2008
    Posts
    150
    I'm not going to do your code for you but here's the basic idea:
    *I'm just going to say 50 pixels to make this easier to read. You should use the actual width of your pictures.

    Create a clip you are going to move left and right.
    Add your pictures to the clip.
    Position each one 50 pixels further to the right so all of your pictures are lined up in a strip.
    When someone clicks on an arrow you should have it move the clip 50 pixels left or right.

    This will do the basic thing you are asking for. If you are a decent programmer you can figure out ways to make it look nicer on your own.

  9. #9
    Flash developer
    Join Date
    Dec 2007
    Posts
    26
    Right,

    if you want it step by step:

    1. Open Flash

    2. Draw a rectangle

    3. Select it and press F8 to convert it to a movieclip

    4. Select that movieclip, select Actions from the Windows menu and paste the code I posted above into the Actions box

    Once you've got this working let me know

  10. #10
    Member
    Join Date
    Jun 2005
    Posts
    69
    i follow your steps but i can get it work

  11. #11
    Senior Member
    Join Date
    Jan 2008
    Posts
    150
    If you want to program something you need to be able to program. We can help you find where the problem in something is but we're not here to put everything together for you.

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