A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Working with AS on pictures...

  1. #1
    Wanna emigrate :)
    Join Date
    Aug 2001
    Location
    Romania
    Posts
    146

    Working with AS on pictures...

    Hello,
    I have 5 pictures that i want them to scroll from left to the right and back when i rollover 2 buttons (L and R!).
    LINKS WITH TUTORIALS FOR MY PROBLEM ARE GOOD TOO!
    Thanx.
    "If i was a king, i could do anithyng!"

  2. #2
    Wanna emigrate :)
    Join Date
    Aug 2001
    Location
    Romania
    Posts
    146

    ?

    Please...at least have you got some links with my problem????
    I looked in Flashkit and a didn't find anything!!!
    "If i was a king, i could do anithyng!"

  3. #3
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    If you put the pictures in a line inside a movie clip, you can then attach a clip event like this to the clip,

    onClipEvent(load) {
    _root.dir = 0;
    }
    onClipEvent(enterFrame) {
    this._x += _root.dir;
    }

    then on the buttons, the left button can be scripted

    on (rollOver) {
    _root.dir = -5;
    }
    on (rollOut) {
    _root.dir = 0;
    }

    the right button

    on (rollOver) {
    _root.dir = 5;
    }
    on (rollOut) {
    _root.dir = 0;
    }

    you could also add an if statement to the clip event to say that when the clip moves past a certain point in either direction the scrolling stops.

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